Scalable, secure, efficient, and adaptable distributed digital ledger transaction network

ABSTRACT

The present disclosure relates to systems, methods, and non-transitory computer readable storage media for implementing a scalable, secure, efficient, and adaptable distributed digital ledger transaction network. Indeed, the disclosed systems can reduce storage and processing requirements, improve security of implementing computing devices and underlying digital assets, accommodate a wide variety of different digital programs (or “smart contracts”), and scale to accommodate billions of users and associated digital transactions. For example, the disclosed systems can utilize a host of features that improve storage, account/address management, digital transaction execution, consensus, and synchronization processes. The disclosed systems can also utilize a new programming language that improves efficiency and security of the distributed digital ledger transaction network.

CROSS-REFERENCE TO RELATED APPLICATIONS

The present application is a continuation of U.S. application Ser. No.16/442,475, filed on Jun. 15, 2019. The aforementioned application ishereby incorporated by reference in its entirety.

BACKGROUND

Recent years have seen significant advancements in hardware and softwareplatforms for managing distributed ledger databases across a network ofcomputing devices. Indeed, so-called “blockchain” systems can manage aconsensus ledger via a network of entities distributed throughout theworld and without a central entity that can be corrupted or otherwisemanipulated to undermine the security and performance of the digitalledger. Specifically, conventional blockchain systems can decentralizecontrol by maintaining a digital ledger on many replicated servers, orvalidator nodes. Algorithms, cryptography, and incentives enable suchnetworks of validator nodes to maintain a collective, tamper-resistantledger of transactions or other digital information.

Despite these advances, however, conventional blockchain systems sufferfrom several technological shortcomings that undermine efficiency,scalability, flexibility, and security of the implementing computingdevices and corresponding distributed databases. For example,conventional blockchain systems often require significant processing andstorage for validator nodes and client devices that interact across theimplementing network. As mentioned above, many conventional blockchainsystems maintain a duplicate database across replicated servers thatstore a history of digital transactions. Moreover, many conventionalblockchain systems sequentially analyze transactions across thevalidator nodes to achieve consensus on the transactions and ultimatelyto update the distributed and duplicated ledger. This approach can placeexorbitant storage and processing demands on computing devices. Indeed,the demand for certain processing devices has skyrocketed in recentyears in proportion to the increased computing demand required byconventional blockchain systems in storing and analyzing transactionsacross distributed computer networks.

The inefficiencies of conventional blockchain systems have also hamperedthe scalability of these systems. For example, processing and storageburdens imposed by conventional blockchain systems undermine transactionthroughput across the network and thus limit the rate and number oftransactions that conventional systems can manage. Accordingly,conventional blockchain systems generally lack the scalability toprovide a global distributed computing solution for managing digitaltransactions. Indeed, to date, conventional blockchain systems havegenerally been limited to a small population of niche users, excludingbillions from accessing and utilizing blockchain technology.

In addition to efficiency and scalability concerns, conventionalblockchain systems are also rigid and inflexible. For example,conventional blockchain systems provide limited options with regard todifferent programs, transactions, contracts, assets, and/or resourcesthat can be accommodated or executed via a distributed database.Moreover, conventional blockchain systems provide limited control forstorage at validator nodes, limited flexibility in executingtransactions at validator nodes, and limited options over authenticationkeys and validation approaches for account holders and users of clientdevices accessing the network.

As mentioned above, conventional blockchain systems are also susceptibleto inaccuracies and/or digital security attacks. For example, groups ofvalidator nodes can agree on different versions of digital ledgers,resulting in inaccuracies, hard-forks, and insecurity of the underlyingdigital information. Some conventional systems perform consensus ontransaction blocks, assuming execution of the transactions will bedeterministic; thus, any non-deterministic execution behavior can resultin inaccurate results at individual devices (or inaccuracies propagatedacross the digital ledger). Further, many conventional systems utilizebloom filters when providing transaction details in response to a query,risking false positives and failing to provide the ability for negativeproofs to confirm accuracy of account data. Further, conventionalblockchain systems often provide unrestricted digital asset access touser accounts storing digital assets, leading to exposure of all assetsto malicious attacks upon loss of a private key associated with a useraccount. Additionally, as many conventional systems perform referencesafety analysis on source code while programs are executed at themachine code level, many such systems inaccurately identify referencesafety issues and/or introduce vectors for malicious attacks.

These, along with additional problems and issues, exist with regard toconventional blockchain systems.

SUMMARY

One or more embodiments described herein provide benefits and/or solveone or more of the foregoing or other problems in the art with systems,methods, and non-transitory computer readable storage media forimplementing a scalable, secure, efficient, and adaptable distributeddigital ledger transaction network. Indeed, the disclosed systems canreduce storage and processing requirements, improve security ofimplementing computing devices and underlying digital assets,accommodate a wide variety of different digital programs (or “smartcontracts”), and scale to accommodate billions of users and associateddigital transactions.

For example, the disclosed systems can make data storage more scalableand efficient by treating the blockchain in consensus as a single datastructure that records the history of transactions and states over time.This implementation simplifies the work of computing devices accessingthe blockchain, allowing them to read data from any point in time andverify integrity using a unified framework. Similarly, to obtainagreement among validator nodes, the disclosed systems can utilize aunique Byzantine-fault-tolerant consensus protocol. This approachprovides high transaction throughput, low latency, and a morecomputationally-efficient method for achieving consensus relative toother blockchains.

In addition, the disclosed systems can utilize a new programminglanguage to implement smart contracts on the blockchain. In particular,this new programming language makes it inherently easier to write codeto fulfill user intent, thereby avoiding unintended bugs or securityincidents (e.g., preventing asset cloning). Specifically, the disclosedsystems can utilize a programming language that enables a linear datatype that constrains digital assets to properties of a physical asset(e.g., a single owner, can only be spent once, restrictions againstcreation of new resources). In some embodiments, the disclosed systemsalso utilize an implementing programming language having a treestructure memory model for improved reference safety analysis. Usingthis programming language, the disclosed systems can implement astatic-dynamic reference safety analysis at the bytecode level, reducingvectors for malicious attacks.

Furthermore, the disclosed systems provide a host of additional featuresthat improve storage, account/address management, digital transactionexecution, consensus, and synchronization processes. For example, withregard to storage, the disclosed systems can implement flexible storagedeletion and/or storage consolidation policies that allow individualcomputer nodes to delete distributed data structures while retainingsufficient ledger information to accurately achieve consensus across thedistributed digital ledger transaction network. The disclosed systemscan also implement lazy account eviction policies that allow for moreflexible storage management based on the individual preferences and/orthe availability of computer memory or processing power at individualcomputing devices. The disclosed systems can also utilize a uniquescratch pad data structure that flexibly tracks variations of thedigital ledger while waiting for consensus.

Similarly, the disclosed systems can provide a variety of improvementswith regard to user accounts, addresses, and account data accessible ona digital ledger. To illustrate, the disclosed systems can utilizere-encrypted sub-addresses to avoid tracing of account activity acrossthe network. The disclosed systems can reduce barriers to initiatetransactions by utilizing e-mail addresses (or other user identifiers)to determine and encrypt main address and sub-address identifierscorresponding to the distributed ledger. In addition, the disclosedsystems can separate smart contract code from smart contract data withinuser accounts, allow individual accounts to store multiple smartcontracts, delegate account permissions to other user accounts on thedigital ledger, and decouple account addresses from cryptographic keys(allowing accounts to flexibly rotate authenticated keys to improvesecurity across the network).

Furthermore, the disclosed systems can improve digital transactionsexecuted across a distributed digital ledger transaction network. Forexample, the disclosed systems can implement transactions on the networkusing arbitrary transactions scripts and configurable smart contracts tomanage tasks surrounding transaction execution. To illustrate, in someembodiments, the disclosed systems can utilize configurable smartcontracts to accept/reject transactions, deduct gas payments, incrementsequence numbers, and distribute gas to computer nodes (and flexiblymodify these processes by consensus as needs of the distributed digitalledger transaction network change over time). In some embodiments, thedisclosed systems further improve transaction execution by performingspeculative parallel execution of transactions to reduce the time andcomputing overhead needed to execute a block of transactions, utilizingaccess limits to reduce exposure of digital assets resulting from theftor loss of an access key, and using transaction event counters toaccurately identify transaction event details and perform negativeproofs.

In addition to improvements in digital transaction execution, thedisclosed systems can also improve consensus processes relative toconventional systems. For example, the disclosed systems can improveaccuracy by performing consensus on state data structures reflectingexecution results (rather than performing consensus on potentiallynon-deterministic transactions). The disclosed systems can alsoimplement consensus pipeline rules to ensure that committed ledgersaccurately reflect the state of the digital ledger. In some embodiments,the disclosed systems further implement system restart protocols tomaintain consensus safety of the network (e.g., even when all nodesexperience a shutdown). Moreover, the disclosed systems can efficiently,flexibly, and accurately control validator nodes participating inconsensus by managing epochs of voting rights via smart contracts.

In addition to the foregoing improvements, the disclosed systems canalso improve synchronization processes across the distributed digitalledger transaction network. For instance, the disclosed systems canimprove the efficiency of synchronization across the distributed digitalledger transaction network by implementing incremental and parallelverification at various computer nodes synchronizing to the network. Inaddition, in some embodiments the disclosed systems utilize waypoints(e.g., published indicators of particular ground-truth reference states)to facilitate synchronization of computer nodes to the network (e.g., tocorrect conflicting digital ledger states, to generate a hard fork, orimplement a genesis block).

In sum, the disclosed systems can implement a distributed digital ledgertransaction network with high transaction throughput, low latency, andan efficient, high-capacity storage system. Moreover, the disclosedsystems can securely manage a wide variety of digital assets, flexiblyaccommodate a variety of different customizable programs and smartcontracts, and scale to execute and manage digital transactions forusers across the globe.

BRIEF DESCRIPTION OF THE DRAWINGS

This disclosure will describe one or more embodiments of the inventionwith additional specificity and detail by referencing the accompanyingfigures. The following paragraphs briefly describe those figures, inwhich:

FIG. 1 illustrates an example distributed digital ledger transactionnetwork in which a ledger transaction system can operate in accordancewith one or more embodiments;

FIG. 2 illustrates a schematic diagram of components of a validator nodedevice used in processing, executing, and committing transactions inaccordance with one or more embodiments;

FIG. 3 illustrates a state data structure generated and maintained bythe ledger transaction system in accordance with one or moreembodiments;

FIG. 4 illustrates an event data structure generated and maintained bythe ledger transaction system in accordance with one or moreembodiments;

FIG. 5 illustrates a transaction data structure generated and maintainedby the ledger transaction system in accordance with one or moreembodiments;

FIG. 6 illustrates a representation of ledger information for obtainingconsensus in accordance with one or more embodiments;

FIG. 7 illustrates the ledger transaction system deleting a portion of atransaction tree stored at computer nodes in accordance with one or moreembodiments;

FIG. 8 illustrates the ledger transaction system deleting orconsolidating portions of a state tree stored at computer nodes inaccordance with one or more embodiments;

FIG. 9 illustrates the ledger transaction system deleting portions of astate tree with a state tree component reflecting multiple differentstate trees in accordance with one or more embodiments;

FIG. 10 illustrates the ledger transaction system performing accounteviction in accordance with one or more embodiments;

FIG. 11 illustrates a block diagram of the ledger transaction systemre-caching account data corresponding to a user account in accordancewith one or more embodiments;

FIG. 12 illustrates a state tree from a state data structure, the statetree representing a currently committed state of the distributed digitalledger transaction network in accordance with one or more embodiments;

FIG. 13 illustrates a block diagram of transaction blocks identified bythe ledger transaction system in accordance with one or moreembodiments;

FIGS. 14A-14B illustrate the ledger transaction system utilizing ascratch pad data structure to track execution results in accordance withone or more embodiments;

FIG. 15 illustrates a schematic diagram of addresses corresponding touser accounts of the distributed digital ledger transaction network inaccordance with one or more embodiments;

FIG. 16 illustrates a block diagram of the ledger transaction systemidentifying a main public address identifier and sub-address identifiersof a user account from a digital visual code in accordance with one ormore embodiments;

FIG. 17 illustrates a block diagram of the ledger transaction systemidentifying a main public address identifier, a sub-address identifier,and an encryption key associated with a user account from a digitalvisual code in accordance with one or more embodiments;

FIG. 18 illustrates a block diagram of the ledger transaction systemidentifying a main public address identifier, a sub-address identifier,and an encryption key of a user account based on an email address inaccordance with one or more embodiments;

FIG. 19 illustrates a schematic diagram of user accounts storing modulesand resources in accordance with one or more embodiments;

FIG. 20 illustrates a block diagram of the ledger transaction systemtransferring permission resources between user accounts in accordancewith one or more embodiments;

FIG. 21 illustrates a block diagram of the ledger transaction systemrotating authentication keys of a user account in accordance with one ormore embodiments;

FIG. 22 illustrates a block diagram of submitting a transaction to thedistributed digital ledger transaction network in accordance with one ormore embodiments;

FIG. 23 illustrates module and a corresponding resource stored on thedistributed digital ledger transaction network in accordance with one ormore embodiments;

FIG. 24 illustrates a block diagram of the ledger transaction systemutilizing a smart contract to perform a series of checks on a receivedtransaction request in accordance with one or more embodiments;

FIG. 25 illustrates a block diagram of the ledger transaction systemutilizing a smart contract to perform execution epilogue tasks inaccordance with one or more embodiments;

FIG. 26 illustrates a block diagram of the ledger transaction systemutilizing a smart contract to distribute gas payments in accordance withone or more embodiments;

FIG. 27 illustrates a block diagram of the ledger transaction systemexecuting transactions in parallel in accordance with one or moreembodiments;

FIG. 28 illustrates a block diagram of the ledger transaction systemexecuting transactions based on determined dependencies in accordancewith one or more embodiments;

FIG. 29 illustrates the ledger transaction system implementing accesslimits on digital assets stored at a user account in accordance with oneor more embodiments;

FIGS. 30A-30B illustrate a block diagram of the ledger transactionsystem generating transaction events in accordance with one or moreembodiments;

FIG. 31 illustrates a series of acts for determining new transactionevents corresponding to a user account in accordance with one or moreembodiments;

FIG. 32 illustrates a block diagram for retrieving event details for asequence of events in accordance with one or more embodiments;

FIG. 33 illustrates a block diagram of the ledger transaction systemutilizing validator node devices to achieve consensus in accordance withone or more embodiments;

FIG. 34 illustrates a block diagram of the ledger transaction systemperforming consensus on execution results in accordance with one or moreembodiments;

FIG. 35 illustrates a block diagram of the ledger transaction systemutilizing pipelining for consensus in accordance with one or moreembodiments;

FIG. 36 illustrates a block diagram utilizing a consensus state toprovide consensus safety in the event of a system restart in accordancewith one or more embodiments;

FIG. 37 illustrates a diagram of the ledger transaction system changinga set of validator node devices in accordance with one or moreembodiments;

FIG. 38 illustrates a block diagram of the ledger transaction systemutilizing incremental verification to download segments of data to acomputer node in accordance with one or more embodiments;

FIG. 39 illustrates a block diagram of the ledger transaction systemdownloading and verifying data in parallel in accordance with one ormore embodiments;

FIG. 40 illustrates a time line of the digital ledger and an associatedwaypoint in accordance with one or more embodiments;

FIG. 41 illustrates block diagrams of the ledger transaction systemutilizing waypoints associated with FTVM transactions in accordance withone or more embodiments;

FIG. 42 illustrates block diagrams of the ledger transaction systemimplementing linear typing rules corresponding to a linear data type inaccordance with one or more embodiments;

FIG. 43 illustrates a block diagram for performing a combined static anddynamic analysis to ensure reference safety in accordance with one ormore embodiments;

FIG. 44 illustrates a flowchart of a series of acts for performingaccount eviction in accordance with one or more embodiments;

FIG. 45 illustrates a flowchart of a series of acts for generating anencrypted sub-address unique to a transaction in accordance with one ormore embodiments;

FIG. 46 illustrates a flowchart of a series of acts for performingparallel execution of transactions in accordance with one or moreembodiments;

FIG. 47 illustrates a flowchart of a series of acts for generatingtransaction events in accordance with one or more embodiments;

FIG. 48 illustrates a flowchart of a series of acts for receivingtransaction event data in accordance with one or more embodiments;

FIG. 49 illustrates a flowchart of a series of acts for executing atransaction utilizing linear data types subject to linear typing rulesin accordance with one or more embodiments; and

FIG. 50 illustrates a block diagram of an exemplary computing device inaccordance with one or more embodiments.

DETAILED DESCRIPTION

One or more embodiments described herein include a ledger transactionsystem for implementing a scalable, secure, efficient, and adaptabledistributed digital ledger transaction network. For example, the ledgertransaction system can manage a programmable database to supportlow-volatility digital assets (e.g., digital cryptocurrency) accessiblearound the world. To illustrate, the ledger transaction system can beimplemented as part of a decentralized network in which a set ofvalidator node devices jointly maintain a database of programmableresources (e.g., digital assets). The ledger transaction system canutilize an authenticated data structure that maps a logical data modelof these databases to a set of tree structures (e.g., Merkle trees). Theledger transaction system can then utilize validator node devices toexecute transactions and communicate via consensus to agree on the stateof the authenticated data structures. In particular, the ledgertransaction system can utilize a unique Byzantine fault tolerantconsensus protocol that allows the network (even with potentiallymalicious validators) to maintain a consistent database over time byexecuting transactions via a new programming language and coming toagreement on their execution using the authenticated data structures.

As mentioned above, the ledger transaction system can provide a varietyof improvements relative to conventional blockchain systems. Forinstance, in one or more embodiments, the ledger transaction systemutilizes a new programming language that improves security, efficiency,and flexibility. In particular, the ledger transaction system canutilize a programming language that enables flexible transactions viaarbitrary transaction scripts and allows user-defined code anddatatypes, including “smart contracts” via modules.

Specifically, the programming language provides the ability to definecustom resource types that enforce linearity. For example, the ledgertransaction system can utilize linear data types to represent digitalassets associated with the distributed digital ledger transactionnetwork. By representing the digital assets as linear data types, theledger transaction system subjects the digital assets to linear typingrules. For example, a digital asset represented as a linear data typemust be used exactly once within a transaction and cannot be copied. Byrepresenting digital assets as linear data types, the ledger transactionsystem provides more flexible and more secure management of digitalassets.

In some embodiments, the ledger transaction system uses a verifiablebytecode language as the executable representation of this programminglanguage. This allows the ledger transaction system to utilize acombined static-dynamic reference safety analysis of transaction scriptsand modules submitted for execution on the distributed digital ledgertransaction network. Indeed, the ledger transaction system can performthe bulk of a reference safety analysis statically at the bytecode levelusing load-time bytecode verification (on structured memory tree models)and perform the remainder of the analysis dynamically at runtime. Thisapproach improves security and reduces vectors for malicious attacks(e.g., attacks that seek to exploit or bypass a compiler). This approachalso results in fewer instructions than a higher-level source language,reducing the overall footprint and making it easier to spot and avoidimplementation errors.

In addition to improvements with regard to the implementing programminglanguage, the ledger transaction system can improve a variety of otherprocesses across a distributed digital ledger transaction network. Forexample, the ledger transaction system can improve storage, addressingand account management, transaction execution, consensus, andsynchronization processes. For example, with regard to storage, theledger transaction system can implement a variety of features to improvethe efficiency, flexibility, and security of data structures maintainedacross a distributed digital ledger transaction network.

To illustrate, as mentioned above, the ledger transaction system canmaintain a plurality of authenticated data structures that store thedata of the digital ledger. In particular, an authenticated datastructures can include a tree data structure (e.g., a sparse Merkle treeor Merkle accumulator) with nodes mapped to entries in a versioneddatabase. For example, the authenticated data structures can include astate data structure (e.g., a state tree mapped to a state databasereflecting user account states), an event data structure (e.g., an eventtree mapped to event data for a particular transaction), and atransaction data structure (e.g., a transaction tree reflectingtransactions together with states and events resulting from thetransactions). By utilizing an authenticated tree data structure, theledger transaction system can efficiently encode current and historicalstates, events, and/or transactions reflected in databases storingprogrammable resources. For example, the ledger transaction system canutilize a transaction tree structure, where the root value of thetransaction state tree provides a unique representation of the currentand historical states, events, and transactions recorded incorresponding databases. Moreover, the ledger transaction system canefficiently obtain consensus across the distributed digital ledgertransaction network with reference to this root value.

In addition, in some embodiments, the ledger transaction systemimplements a set of storage deletion rules and/or a set of storageconsolidation rules to manage the storage of the computer nodes of thedistributed digital ledger transaction network. For example, the ledgertransaction system can apply configurable storage deletion rules thatallow different computer nodes to identify what (or what portions) ofdata structures to maintain. Moreover, the ledger transaction system canautomatically remove portions of data structures to reduce storage andprocessing demands. For instance, the ledger transaction system candelete sub-trees of authenticated tree structures upon identifying thatthe sub-trees include full (e.g., populated) leaf nodes. Similarly, theledger transaction system can store multiple different versions of adata structure by re-using unchanged portions of a previous version. Inparticular, the ledger transaction system can generate sub-treecomponents (reflecting only modified nodes) together with pointersreferring unchanged nodes within historical tree structures. Thus, theledger transaction system can efficiently and flexibly manage storage onthe distributed digital ledger transaction network.

In some embodiments, the ledger transaction system can also improvestorage by performing lazy account eviction. In particular, the ledgertransaction system can delete, at a computer node, account dataassociated with expired user accounts based on user preferences and/orthe computing resources available at that computer node. For example,the ledger transaction system can delete expired account data at acomputer node without executing a transaction on the distributed digitalledger transaction network. Moreover, by embedding eviction dates inauthenticated data structures, the ledger transaction system canmaintain consistent query responses for data across the distributeddigital ledger transaction network (even while providing each clientdevice flexibility to delete expired data at its leisure). Furthermore,in one or more embodiments, the ledger transaction system can securelyre-cache evicted accounts based on data representations remaining in theauthenticated data structure. In this manner, the ledger transaction cansecurely and flexibly delete storage at computer nodes for moreefficient storage management.

Additionally, one or more embodiments of the ledger transaction systemimproves storage processes by utilizing a scratch pad data structure totrack execution results before committing them to storage. Inparticular, the ledger transaction system can utilize the scratch paddata structure to temporarily store execution results of conflictingtransaction blocks and how those execution results affect the state ofuser accounts maintained on the distributed ledger. The ledgertransaction system can then commit execution results stored in thescratch pad data structure based on the consensus protocol. Accordingly,the ledger transaction system can flexibly execute conflictingtransaction blocks to ensure that computer nodes accurately reflect theconsensus digital ledger.

In addition to improvements in storage, as mentioned above the ledgertransaction system can also improve management of addresses and/oraccounts within a distributed digital ledger transaction network. Forexample, in some embodiments, the ledger transaction system generatesencrypted sub-addresses unique to a particular transaction in order tosecurely protect the sub-address from identification by externalentities. For example, the ledger transaction system can encrypt asub-address associated with a user account using a public cryptographickey associated with the user account. In one or more embodiments, theledger transaction system utilizes a public document (e.g., abillboard), digital visual codes, email addresses (and/or DNS records),telephone numbers, or user IDs to identify account addressinginformation and/or public encryption keys. In this manner, the ledgertransaction system can flexibly initiate and execute transactionswithout leaving traceable information linked to sub-addresses on thedigital ledger.

Additionally, in one or more embodiments, the ledger transaction systemcan separate smart contract code from smart contract data within useraccounts (in contrast to conventional systems that use singleton-likeobjects to execute smart contracts). The ledger transaction system canutilize a module (smart contract code) to define the attributes of aresource (smart contract data/values) owned by a corresponding useraccount, where the module defines the procedures that can be used tomodify, create, delete, or otherwise interact with the resource. Theledger transaction system can utilize the module to generate one or moreresources sharing the same attributes and governed by the same set ofprocedures. Further (in contrast to conventional systems that generallystore a single smart contract with regard to an account), the ledgertransaction system can implement an addressing scheme for storingmultiple modules and/or resources under a single user account address.

The ledger transaction system can further improve account management bystoring and transferring variety of digital assets. For example, in oneor more embodiments, the ledger transaction system can generate aresource corresponding to withdraw permissions of a user account. Theledger transaction system can then delegate the withdraw permissions toanother user account by executing a transaction sent from the useraccount transferring the withdraw permissions (i.e., as a digitalasset). Thus, the ledger transaction system can flexibly provide accessto the digital assets of a user account to another account according tothe needs of the user associated with the user account.

Additionally, the ledger transaction system can improve management ofaccounts across the distributed digital ledger transaction network bydecoupling authentication keys associated with user accounts from theaddresses of the user accounts. For example, the ledger transactionsystem can replace the authentication key of a user account withoutrequiring the contents of the user account be moved to a new address. Toillustrate the ledger transaction system can generate a newauthentication key for a user account if one of the cryptographickeys—such as the private encryption key—associated with the user accountleaks. Thus the ledger transaction system can modify authentication keysto provide flexible security solutions for user accounts.

As mentioned above, in addition to storage and account/addressingimprovements, the ledger transaction system can also improve transactionexecution within a distributed digital ledger transaction network. Forexample, in some embodiments, the ledger transaction system utilizesarbitrary transaction scripts for executing transactions on thedistributed digital ledger transaction network. Indeed, the ledgertransaction system can utilize transaction scripts containing anarbitrary bytecode program that can invoke multiple procedures fromvarious modules, use conditional logic, and perform local computation ina single script. The transaction script can invoke the module proceduresto modify, create, destroy, or otherwise interact with one or moreresources corresponding to that module. In other words, the ledgertransaction system can utilize transaction scripts to interact withresources based on the procedures defined in the corresponding module.Indeed, in one or more embodiments, the ledger transaction system limitsinteraction with the resources to the corresponding module's proceduresin order to provide for data abstraction. Thus, the ledger transactionsystem can utilize transaction scripts to more flexibly executetransactions on the distributed digital ledger transaction network.

The ledger transaction system can further improve transactions byutilizing modules (i.e., smart contracts) as part of the process oftransaction execution. For example, the ledger transaction system canutilize a smart contract to perform checks on transactions and rejectthe transactions if necessary. In addition, the ledger transactionsystem can utilize a smart contract to perform post-execution tasks,such as incrementing a sequence number stored at a user account anddeducting a transaction fee from the user account. Additionally, theledger transaction system can utilize a smart contract to distribute gaspayments to computer nodes participating on the distributed digitalledger transaction network. In one or more embodiments, these modulesare configurable, such that they can be replaced or updated as needed.Thus, the ledger transaction system utilize smart contracts to executetransactions and flexibly modify the rules governing transactions byconsensus over time.

In one or more embodiments, the ledger transaction system also improvesexecution of transactions by performing speculative parallel executionof a plurality of transactions. For example, the ledger transactionsystem can identify a first state data structure of the distributeddigital ledger transaction network (i.e., a first state of the digitalledger) and a plurality of transactions associated with user accounts ofthe distributed digital ledger transaction network. The ledgertransaction system can then perform a preliminary execution of thetransactions in parallel relative to the first state data structure todetermine a plurality of transaction results and dependencies among thetransactions with regard to the user accounts. The ledger transactionsystem can then modify the first state data structure to a second statedata structure by applying the plurality of transaction results based onthe dependencies of the transactions. By executing transactions inparallel, and committing transactions to storage based on determineddependencies, the ledger transaction system executes transactions moreflexibly and efficiently than conventional systems.

The ledger transaction system can also improve security and flexibilityof transaction execution by utilizing access limits to control access todigital assets associated with a user account. For example, in one ormore embodiments, the ledger transaction system can implement accesslimits that must be satisfied before granting access to digital assets.In some embodiments, the ledger transaction system can require athreshold number of access keys from a group of keys before providingaccess to a user account. Moreover, in some embodiments, the ledgertransaction system 106 utilizes rate/value limited access keys andcorresponding key limits to limit the access provided to the digitalassets of a user account in executing transactions. For example, theledger transaction system can limit the time for which an access key isvalid and/or the amount of digital assets (e.g., the value of digitalcurrency) accessible by that access key. Using these access limits, theledger transaction system provides more security with regard to digitalassets. Specifically, the ledger transaction system can utilize accesslimits to prevent unlimited access to digital accounts from a maliciousactor in the event that an access key is leaked or stolen.

The ledger transaction system can also improve transactions across thedistributed digital ledger transaction network by utilizing transactionevent counters to track and report transaction event details. Forexample, upon executing a transaction associated with a user account,the ledger transaction system can generate one or more transactionevents corresponding to that user account (within an event datastructure). The ledger transaction system can then increment countvalues of transaction event counters corresponding to those transactionevents (within a state data structure). Client devices implementing theledger transaction system can monitor (e.g., poll) the transaction eventcounters to determine when events have occurred, and then utilize countvalues to request and verify transaction details (from the transactiondata structure). Thus, the ledger transaction system can more accuratelyindicate when a transaction event has occurred and more efficientlyprovide event data. The ledger transaction system can also polltransaction event counters to perform negative proofs establishing thataccount data has not changed.

As mentioned above, in addition to improving execution of transactions,the ledger transaction system can also improve the process of obtainingconsensus across the distributed digital ledger transaction network. Forexample, in one or more embodiments, the ledger transaction systemutilizes the validator node devices of the distributed digital ledgertransaction network to perform consensus based on the execution resultscorresponding to a transaction block, rather than the performingconsensus only on the transactions themselves. In other words, theledger transaction system can have validators collectively sign the fullresulting state of a block, rather than a sequence of transactions. Inthis manner, the ledger transaction system anticipates non-deterministicexecution behavior and ensures that the validator nodes commit anaccurate representation of the digital ledger to storage upon thetransaction blocks reaching consensus.

In addition, the ledger transaction system can also improve consensusprocesses by utilizing a method for pipelining the consensus protocol.Indeed, in one or more embodiments, the validator node devices of thedistributed digital ledger transaction network vote on the executionresults of a transaction block in several rounds of voting before theledger transaction system commits those execution results to storage.For example, the ledger transaction system can apply a contiguous3-chain commit rule by committing a first state of the digital ledger tomemory after three contiguous rounds (the first state of the digitalledger and two subsequent states of the digital ledger) have obtainedconsensus across the distributed digital ledger transaction network. Inthis manner, the ledger transaction system can ensure the accuracy ofcommitted data structures.

Further, the ledger transaction system can also improve consensus safetyof validator node devices upon a system restart. For example, before avalidator node device submits a vote for a transaction block, the ledgertransaction system can store, at each validator node device, theconsensus state for that validator node device (including the last votedround and the preferred block round). Upon a system restart, the ledgertransaction system can load the consensus state at the validator nodedevice to continue participating in consensus without issue. In thismanner, even if all validator nodes shut down, the ledger transactionsystem can ensure consensus safety when the validator nodes restart.

As mentioned above, consensus can include voting amongst a plurality ofvalidator nodes for a particular ledger state. In one or moreembodiments, the ledger transaction system improves this consensusprocess by managing the voting rights of the validator node devices viasmart contract. For example, the ledger transaction system can implementa proof-of-stake protocol to allow user accounts of the distributeddigital ledger transaction network to manage participation in the set ofvalidator node devices. The ledger transaction system can further managechanges to the set of validator node devices via a smart contract. Inone or more embodiments, the ledger transaction system utilizes modulesto manage the proof-of-stake protocol and/or the changes to the set ofvalidator node devices. Indeed, the ledger transaction system canutilize a module to enforce a change to the set of validator nodedevices at the boundary of an epoch.

In addition to consensus, the ledger transaction system can also providetechnical benefits with regard to synchronization processes of thedistributed digital ledger transaction network. For example, in someembodiments, the ledger transaction system uses incremental verificationat a computer node in synchronizing to the distributed digital ledgertransaction network. Indeed, a synchronizing computer node can downloaddata associated with the digital ledger together with data proofs (e.g.,a Merkle proof) in segments. The ledger transaction system can thenverify, at the client device, that the received data is accurate beforedownloading more data. Thus, the ledger transaction system can moreefficiently synchronize computer nodes to the distributed digital ledgertransaction network.

Additionally, the ledger transaction system can improve synchronizationefficiency utilizing a parallel synchronization approach. Indeed, theledger transaction system can download different segments of data andcorresponding proofs associated with the digital ledger (e.g., differentsnapshots of the state of the digital ledger) on separate verificationdevices. The ledger transaction system can then use each verificationdevice to verify the segment of data downloaded to that device inparallel with the other verification devices. Accordingly, the ledgertransaction system can more efficiently synchronize computer nodes tothe distributed digital ledger transaction network.

In one or more embodiments, the ledger transaction system alsofacilitates synchronization across the distributed digital ledgertransaction network utilizing waypoints. In particular, the ledgertransaction system can generate and use a waypoint to indicate thecorrect/preferred version of a digital ledger to utilize across thedistributed digital ledger transaction network. By utilizing waypoints,the ledger transaction system can also facilitate acceptance of certaintransaction (i.e., FTVM transactions) that may otherwise be rejected.For example, the ledger transaction system can utilize waypoints tofacilitate acceptance of FTVM transactions that establish a genesisblock or create a hard fork on the distributed digital ledgertransaction network.

As illustrated by the foregoing discussion, the present disclosureutilizes a variety of terms to describe features and benefits of theledger transaction system. Additional detail is now provided regardingthe meaning of these terms. For example, As used herein, the term“digital ledger” (or “distributed digital ledger” or “public ledger”)refers to common data maintained across a plurality of computingdevices. In particular, a digital ledger can include one or more commondata structures maintained by a plurality of computing devices thatreflects states, transactions, events, and/or account data. Toillustrate, a digital ledger can include one or more data structuresreflecting the state of the network (i.e., the state of the useraccounts of the network), data associated with transactions executedacross the network, data corresponding to transaction events, and/ordata relating to consensus of the digital ledger. The digital ledger caninclude, but is not limited to, the following properties:publicly-available (i.e., viewed by anyone), tamper-resistant (i.e.,data manipulation is detectable), transparent (i.e., anyone can view thehistory of the digital, including executed transactions), and replicated(i.e., every computer node has a copy).

Additionally, as used herein, the term “distributed digital ledgertransaction network” refers to a network of computing devices formaintaining a digital ledger. In particular, a distributed digitalledger transaction system can include a collection of computing devices,associated peripherals, communication protocols, and communicationmediums that can implement and/or interact with a system implementing adigital ledger (e.g., the ledger transaction system). For example, adistributed digital ledger transaction network can include one or moreclient devices and computer nodes communicating via a network toimplement and/or interact with the ledger transaction system. As thedistributed digital ledger transaction network can implement a digitalledger, in one or more embodiments, the terms “state of the distributeddigital ledger transaction network” and “state of the digital ledger”are used synonymously.

Further, as used herein, the term “computer node” refers to a computingdevice participating in the distributed digital ledger transactionnetwork. In particular, a computer node can refer to a computing devicethat stores and maintains, at least part of, the digital ledger. Forexample, a computer node can include a full node device (e.g., a “fullnode”) or a validator node device (e.g., a “validator node”).

Additionally, as used herein, the term “user account” refers to anaccount of the distributed digital ledger transaction network. Inparticular, a user account can refer to a collection of code and/or data(i.e., modules and/or resources) stored within a state data structure ofthe distributed digital ledger transaction network. A user account canbe associated with a user of the distributed digital ledger transactionnetwork but is not limited to such an account. For example, a useraccount can also include an administrative account, or an accountotherwise used to store code or data unassociated with a particularuser. Similarly, a user account can include custodial wallets that acton behalf of their users.

As used herein, the term “public key” (or “public cryptographic key,” or“public encryption key,” or “asymmetric key”) refers to a publiclyvisible cryptographic key. In particular, a public key can refer to acryptographic key associated with a user account meant to be sent toand/or used by entities unassociated with the user account. For example,a public key can be sent with a transaction from a user account to avalidator node device of the distributed digital ledger transactionnetwork. A public key can have a corresponding private key.

As used herein, the term “private key” (or “private cryptographic key,”or “private encryption key”) refers to a privately kept cryptographickey. In particular, a private key can refer to a cryptographic keyassociated with a user account (and corresponding to a public key of theuser account) that is maintained in secrecy. An example use of a privatekey includes signing (e.g., encrypting) a transaction sent from a useraccount using a private key corresponding to the user account.

Additionally, as used herein, the term “authentication key” refers to avalue authenticating a user account. In particular, an authenticationkey can refer to a value stored at a user account used to authenticatethe user account when the user account sends a data (e.g., a transactionrequest) across the distributed digital ledger transaction network(e.g., to a validator node device). For example, an authentication keycan include the account address or hash of the account address of thecorresponding user account or a hash of the public key of thecorresponding user account. As described below, in some embodiments theledger transaction system creates a modified authentication key that isdivorced from the account address.

Further, as used herein, the term “main public address identifier” (or“main address identifier” or “public address identifier”) refers to anidentifier for the main address of a user account of the distributeddigital ledger transaction network. In particular, a main public addressidentifier can include the main public address itself or a valueassociated with a user account that indicates the main address of theuser account. As used herein, the term “main public address” or “mainaddress” or “public address” or “address” refers to an account addressof a user account on the distributed digital ledger transaction network.In particular, a main public address can refer to an account addressdirectly associated with and tracked by the digital ledger.

Relatedly, as used herein, the term “sub-address identifier” refers toan identifier for a sub-address associated with a user account of thedistributed digital ledger transaction network. In particular, asub-address identifier can refer to a sub-address itself or a valueindicating a sub-account associated with a user account of thedistributed digital ledger transaction network. Indeed, in one or moreembodiments, a user account of the distributed digital ledgertransaction network maintains an internal database of one or moresub-accounts. The user account can identify a particular sub-accountusing the corresponding sub-address.

Additionally, as used herein, the term “consensus” refers to aconfirmation of a digital ledger (e.g., confirmation of a ledgerreflecting a state and/or transactions). In particular, consensus canrefer to acceptance of a digital ledger (e.g., state reflecting atransaction or block of transactions) via a consensus protocol. In someembodiments, consensus refers to acceptance of the execution resultscorresponding to a transaction or transaction block. Consensus can bedetermined using a variety of different consensus protocols, includingvarious members of the Byzantine fault tolerant family of consensusprotocols. To illustrate, consensus can be determined using a HotStuffconsensus protocol, a proof-of-work consensus protocol, a proof-of-stakeconsensus protocol, and/or a delegated proof-of-stake consensusprotocol. For example, consensus can be determined based on a number ofvotes provided by a set of validator nodes confirming that a block oftransactions (or the execution results corresponding to the block oftransactions) is valid.

As used herein, the term “epoch” refers to a period that a set ofvalidator node devices participate in consensus. In particular, an epochcan refer to a minimum delay between changes in the set of validatornode devices. Epochs can, for example, be measured by time or a numberof transaction blocks that have gone through consensus (e.g., a numberof voting rounds).

Further, as used herein, the term “request” refers to a transmission toa computer node of the distributed digital ledger transaction network.In particular, a request can refer to a transmission to a computer noderequesting performance of an action. For example, a request can includea transaction request or a query for information retrieval. Though thefollowing disclosure will generally discuss requests as submitted byclient devices, requests are not so limited. In some embodiments,requests can be sent by an administrator device or another computer nodeof the distributed digital ledger transaction network (e.g., in theprocessing of sharing requests among computer nodes).

Specifically, as used herein, the term “transaction request” (or“transaction event request” or “request for a transaction”) refers to arequest corresponding to a transaction (e.g., a request to execute orcommit a transaction to the digital ledger). In particular, atransaction request can refer to a transmission, received by a computernode, requesting execution of a transaction via the distributed digitalledger transaction network. A transaction request can include atransaction to be executed (e.g., as detailed within a transactionscript). In some embodiments, a transaction request includes additionaldetail, such as a sequence number corresponding to the requestedtransaction, an account address of the sending user account, a publickey of the sending user account, etc. Though the following disclosurewill generally discuss transaction requests as submitted by clientdevices, transaction requests are not so limited. Transaction requestscan be sent by an administrator device or another computer node (e.g.,in the processing of sharing transaction requests among computer nodes)of the distributed digital ledger transaction network.

Specifically, as used herein, the term “account reinstatement request”refers to a transaction request to reactivate a user account. Inparticular, an account reinstatement request can refer to a request tore-cache, within an account state data structure, account dataassociated with an expired user account. An account reinstatementrequest can include proposed account data for the requested re-caching.

Further, as used herein, the term “transaction” refers to a program oraction performed on the distributed digital ledger transaction network.In particular, a transaction can include the performance of at least oneoperation (e.g., by a computer node) that modifies the state datastructure of the distributed digital ledger transaction network. Forexample, a transaction can include a transfer of one or more digitalassets between user accounts or an account reinstatement.

As used herein, the term “execution” or “execution of a transaction”refers to one or more acts carried out with regard to a transaction. Inparticular, the term execution can refer to running a transaction scriptwith its arguments and the current ledger state as input to produce atransaction output. In performing execution of a transaction, the ledgertransaction system can perform a collection of acts that includes, butis not limited to, performing initial checks upon receiving atransaction, analyzing the transaction (e.g., verifying transactionscript and modules), publishing modules (e.g., publishing modelscorresponding to the transaction within impacted user accounts), runningtransaction script, and running epilogue (e.g., charging for gas usedand incrementing user sequence number).

As used herein, the term “dependencies” or “dependencies oftransactions” refers to a relation between two or more transactions. Inparticular, dependencies can refer to two or more transactions withinthe same transaction block that are associated with one or more of thesame user accounts. More specifically, two or more transactions can bedependent when the execution of one transaction depends on the executionof another transaction. For example, two transactions can be dependentwhere one transaction writes to a user account and another transactionreads from the user account. The dependencies can refer to a variety ofdifferent relations corresponding to a variety of granularities of theaccount data. For example, dependency can refer to utilization of anycommon resource stored in a user account and identified by two or moretransactions.

Additionally, as used herein, the term “transaction event” or “event”refers to a result of a transaction. In particular, a transaction eventcan refer to side effects (e.g., updates or modifications) produced byexecuting a transaction. Examples of transaction events include, but arenot limited to, a withdrawal of a digital asset from a user account or adeposit of a digital asset to a user account. As used herein, the term“transaction event detail request” refers to a query for informationthat requests event data corresponding to a transaction event. Atransaction event detail request can include a request for event datacorresponding to a single transaction event or event data. Additionally,a transaction event detail request can include a transaction eventsequence request for event data corresponding to a sequence of events.

Further, as used herein, the term “event type” or “event class” refersto a transaction event category. In particular, an event type can referto a classification applicable to a set of transaction events having oneor more common characteristics. For example, an event type can refer totransaction events corresponding to payments received by a user accountor transaction events corresponding to payments sent by a user account.

As used herein, the term “event data” or “transaction event data” refersto digital data associated with a transaction event. For example, eventdata can include details of the transaction event (referred to as“transaction event details”), an access path corresponding to atransaction event counter corresponding to the transaction event, and asequence number corresponding to the count value of the transactionevent counter associated with the transaction event.

As used herein, the term “transaction event counter” refers to a counter(e.g., stored at a user account) that tracks events associated with auser account. For example, a transaction event counter can include aresource, stored at a user account, generated to track events associatedwith the user account. A transaction event counter can store a countvalue that indicates a number (or volume) of events associated with theuser account that have been generated. As used herein, the term “eventcount request” refers to a query for information regarding the countvalue of a transaction event counter.

Further, as used herein, the term “account state” or “user accountstate” refers to a condition of a user account of the distributeddigital ledger transaction network at a particular period, iteration,version, or time. In particular, an account state can refer to thevalues (e.g., key-value pairs) associated with a user account at aparticular time, iteration, or version of a digital ledger. An accountstate can include any values relevant to or associated with a useraccount. For example, an account state can include the resources (e.g.,digital assets) and modules associated with a user account. An accountstate can include other values as well, such as an eviction dateassociation with a user account.

Additionally, as used herein, the term “data structure” or“authenticated data structure” refers to a collection of data. Inparticular, an authenticated data structures can refer to a collectionof data that allows a verifier to measure accuracy of the data. Forexample, an authenticated data structure can include one or more treestructures that maps to entries of one or more corresponding databases.A verifier can analyze a short authenticator of the tree structure toverify the accuracy of the tree structure and/or the correspondingdatabase. As mentioned above (and described in greater detail below), adata structure can include, but is not limited to, a state datastructure, an event data structure, a transaction data structure, and asignature data structure.

In particular an authenticated data structure can allow a verifier, V,to hold a short authenticator, a, which forms a binding commitment to adata structure D. An untrusted prover P, which holds D computes andreturns both r, the result of the computation for some function F, aswell as π, a proof F(D)→r of the correct computation of the result tothe verifier. V can run Verify(a, F, r, π) which returns true if an onlyif F(D)=r. As mentioned, authenticated data structures can include treestructures used to store maps between integers and string values.

Further, as used herein, the term “data tree,” “tree structure,” or“tree data structure” refers to data represented as a set of linkednodes (with a root node and one or more subtrees of parent nodes andchildren nodes) mapped to one or more entries of a database (e.g.,mapping integers of the nodes to string values of the database). A datatree can include, but is not limited to, a binary tree. For example, adata tree can include a Merkle tree, such as a sparse Merkle tree orMerkle accumulator. A tree can refer to a state tree, an event tree, ora transaction tree.

For example, in a Merkle tree of size 2^(k), D maps every integer keyi∈[0, 2^(k)), to a string value s_(i). The authenticator is formed fromthe root of a full binary tree created from the strings, labeling leavesas H(i∥s_(i)) and internal nodes as H(left∥right) where H is acryptographic hash function (or “hash”). The function F the proverwishes to authenticate relates to lookups of key-value pairs, e.g., F:(k, v)∈D, where r=(k, v). P authenticates lookups for an item i in D byreturning a proof π consisting of the labels of the siblings of each ofthe ancestors of node i.

As used herein, the term “database” or “database structure” refers to acollection of data (e.g., string values). For example, a database caninclude a versioned database comprising account values, event details,transactions details, signatures or other information. Accordingly, adatabase can include, but is not limited to, a state database, an eventdatabase, a transaction database, or a signature database. In someembodiments, the ledger transaction system can combine a state database,event database, transaction database, and/or signature database into asingle database (e.g., a single digital file).

Relatedly, as used herein, the term “intermediate state data structure”refers to an uncommitted state data structure. In particular, anintermediate state data structure can refer to a state data structurethat has not been written into storage (i.e., permanent storage). Forexample, an intermediate state data structure can include a state datastructure that is stored in temporary storage as a result ofpreliminarily executing transactions in a transaction block beforeconsensus has been achieved.

As used herein, the term “data representation” or “account staterepresentation” refers to node values (e.g., integers) in a datastructure representing corresponding entries (e.g., strings) in adatabase. For example, an account state representation can refer todigital data stored within a node (e.g., a leaf node) of a state treethat reflects account data corresponding to the node within a statedatabase. For example, a data representation can include a hash ofentries (e.g., an account value) stored within an entry of a database(e.g., a state database). A data representation can further include anauthentication key and/or an eviction date of the corresponding useraccount.

As used herein, the term “account data” refers to digital data stored ina state database. In particular, account data can refer to digital datastored within one or more entries of a database, the entries beingassociated with a particular user account. Account data can include, butis not limited to, an account value (e.g., the digital assets owned bythe user account) and a hash of the account value that provides amapping between the database entries and the account staterepresentation of the user account.

Additionally, as used herein, the term “lazy deletion” refers to anasynchronous deletion among computer nodes of the distributed digitalledger transaction network. In particular, lazy deletion can includemarking an element as deleted/expired (without deleting the underlyingdata until a later time selected at the leisure of the computingdevice). For example, the act of deleting can occur based on userpreferences set at the computer node or based on availability ofcomputing resources of the compute node. The act of deleting can occurindependent of when other computer nodes of the distributed digitalledger transaction network delete the corresponding database entriesstored at those computer nodes.

As used herein, the term “scratch pad data structure” refers to acollection of (temporary) data storing execution results until theledger transaction system has determined whether consensus has failed orsucceeded with regard to those execution results. The scratch pad datastructure can store the execution results of multiple transactionblocks, some of which may conflict, representing alternative possibleadditions to the digital ledger.

Additionally, as used herein, the term “eviction date” refers to anexpiration time of a user account. In particular, an eviction date canrefer to a time at which a user account is no longer considered active.To illustrate, an eviction date can include a timestamp associated witha user account. If a time of the distributed digital ledger transactionnetwork is greater than the time included in the timestamp, that useraccount has expired.

Further, as used herein, the term “rent deposit amount” refers to apayment for storage on the distributed digital ledger transactionnetwork. In particular, a rent deposit amount can refer to currency paidto use storage on the distributed digital ledger transaction network tostore digital data corresponding to a user account of the distributeddigital ledger transaction network. A rent deposit amount can refer to avalue paid in digital currency (i.e., gas or other digital currencyexchanged on the distributed digital ledger transaction network).

As used herein, the term “module” refers to smart contract code. Inparticular, a module can refer to a code value. More specifically, amodule can refer to an object on the distributed digital ledgertransaction network that contains code defining and declaring types andprocedures used in implementing the module. For example, a module candefine a class of objects that implement that module. To illustrate, amodule can include bytecode that declares resource types and procedures.In some embodiments, a module is defined by an address of an accountwhere the module is declared.

As used herein, the term “resource” refers to smart contract data. Inparticular, a resource can refer to a data value. Indeed, a resource canrefer to an object that provides a specific instance or implementationof a module, subject to the data type(s) defined therein and manipulatedusing the procedures defined therein. For example, a resource caninclude a language feature that that enables implementation of digitalassets (such as a digital currency, from a class of digital assetsdefined within a module), data structures, and logic. In one or moreembodiments, a resource includes a record that binds name fields tosimple values (i.e., integers) or complex values (i.e., other resourcesembedded inside the particular resource).

As used herein, the term “digital asset” refers to digital dataassociated with (e.g., owned by or belonging to) a user account. Inparticular, a digital asset can refer to a resource that is owned by auser account and generated from a module defining a class of digitalassets. For example, a digital asset can include a title representingownership of a physical asset or another digital asset, or one or moreunits of a digital currency or a fraction of a unit of digital currency.In one or more embodiments, the ledger transaction system represents adigital asset as a linear data type, subject to associated linear typingrules.

Additionally, as used herein, the term “linear data type” refers to aprogramming value. In particular, a linear data type can refer to aprogramming value used to enforce linearity with regard to a resource onthe distributed digital ledger transaction network. For example, alinear data type can represent units of digital currency or otherdigital assets on the distributed digital ledger transaction network.Relatedly, as used herein, the term “linear typing rules” refer to oneor more rules associated with linear data types, the rules enforcinglinearity. For example, the linear typing rules can include a lineartyping rule that requires that a digital asset of a linear data type beused exactly once during a transaction in which the digital asset isreferenced. Additionally, the linear typing rules can include a lineartyping rule that prohibits a digital asset from being duplicated (i.e.,copied).

As used herein, the term “in parallel” (when referring to processesperformed by one or more computing devices) means performing processeswith some overlap with regard to time (e.g., simultaneously or nearsimultaneously). In particular, the term “in parallel” can refer to aplurality of processes performed in a way so that at least two of theprocesses overlap in some way so that at least part of the at least twoprocess occur at the same time. For example, the at least two processescan overlap entirely so that they both begin and end concurrently. Inparallel can include, but is not limited to, executing transactions,downloading data, or verifying data.

Further, as used herein, the term “access path” refers to an identifierof a location of digital data within a data structure. In particular, anaccess path can refer to a location of a module or resource within auser account of the distributed digital ledger transaction network. Forexample, an access path can include an address (e.g., a main address)associated with a user account and an identifier corresponding to theresource or module.

Additionally, as used herein, the term “nonce” (or “cryptographicnonce”) refers to a character set. In particular, a nonce can refer to anon-deterministic (e.g., random one or pseudo-random) number. Forexample, a nonce can include a single character (e.g., a single numericvalue) or a string of characters.

As used herein, the term “digital visual code” refers to an image thatencodes digital data. In particular, a digital visual code can refer toimage (e.g., a pattern) that can be decoded to obtain digital dataassociated with a user account of the distributed digital ledgertransaction network. For example, a digital visual code can include aquick response (“QR”) code but can also include any other image fromwhich digital data can be determined.

Additionally, as used herein, the term “DNS record” refers to an entryin a Domain Name System (“DNS”). In particular, a DNS record can referto an entry in a DNS database that maps an email address to accountidentification information (e.g., a main public address identifierand/or a public encryption key) for a user account on the distributeddigital ledger transaction network. For example, a DNS record caninclude a DNS text record (“TXT record”). Relatedly, as used herein, theterm DNSSEC (or “Domain Name System Security Extensions”) refers to aset of security extensions to DNS that can assist in authenticating orotherwise validating data stored on a DNS.

Further, as used herein, the term “gas” refers to a digital asset usedfor fee payments. In particular, gas can refer to a digital currencyassociated with a user account used to pay fees for actions taken on thedistributed digital ledger transaction network. For example, gas caninclude digital currency used to pay transaction fees, an accountstartup fee, an account reinstatement fee, or a rent deposit. Gas caninclude a distinct digital asset or can be extracted from other digitalassets associated with a user account.

I. System Overview

A. Computing Environment

Additional detail regarding the ledger transaction system will now beprovided with reference to the figures. For example, FIG. 1 illustratesa schematic diagram of a distributed digital ledger transaction network100 in which a ledger transaction system 106 can be implemented. Asillustrated in FIG. 1, the distributed digital ledger transactionnetwork 100 includes a communication network 102, computer nodes 114(which include validator node devices 108 a-108 b and full node devices108 c-108 d), and client devices 112 a-112 n (having corresponding users116 a-116 n).

Although the distributed digital ledger transaction network 100 of FIG.1 is depicted as having a particular number of components, thedistributed digital ledger transaction network 100 can have any numberof additional or alternative components (e.g., any number of computernodes, client devices, or other components in communication with theledger transaction system 106 via the communication network 102).Similarly, although FIG. 1 illustrates a particular arrangement of thecommunication network 102, the computer nodes 114, the client devices112 a-112 n, and the users 116 a-116 n, various additional arrangementsare possible.

The communication network 102, the computer nodes 114, and the clientdevices 112 a-112 n may be communicatively coupled with each othereither directly or indirectly (e.g., through the communication network102 discussed in greater detail below in relation to FIG. 50). Moreover,the computer nodes 114, and the client devices 112 a-112 n may include acomputing device (including one or more computing devices as discussedin greater detail below with relation to FIG. 50).

As mentioned above, the distributed digital ledger transaction network100 includes the computer nodes 114. In general, the computer nodes 114can generate, store, receive, and/or transmit data, including datacorresponding to a digital ledger. For example, the computer nodes 114can receive transaction requests and transmit transaction executionresults. In one or more embodiments, at least one of the computer nodes114 comprises a data server. In some embodiments, at least one of thecomputer nodes 114 comprises a communication server or a web-hostingserver. In further embodiments, one or more of the computer nodes 114include personal computing devices operated by a user.

In one or more embodiments, as shown in FIG. 1, the computer nodes cantransmit data to one another. For example, a given computer node cantransmit data to a particular computer node (i.e., one computer node)using point-to-point communication. A given computer node can alsotransmit data to all other computer nodes using broadcasting techniques.For example, in one or more embodiments, a computer node broadcasts databy transmitting the data to a random or semi-random subset of computernodes with voting power (e.g., validator node devices). The recipientvalidator node devices can then reshare (i.e., retransmit) to othercomputer nodes in the same way until the data know to (i.e., stored at)every computer node stabilizes.

In one or more embodiments, a computer node transmits data to othercomputer nodes in several steps. For example, at a first step, thetransmitting computer node can make the data available (i.e., passivelypublish the data). The transmitting computer node can then send anotification to each potential recipient computer node, indicating thatthe data is now available. Subsequently, the transmitting computer nodecan let the potential recipient computer nodes connect to thetransmitting computer node and retrieve the available data.

As shown FIG. 1, the computer nodes include the validator node devices108 a-108 b and the full node devices 108 c-108 d. As will be discussedin greater detail below, the validator node devices 108 a-108 b and thefull node devices 108 c-108 d can perform different functions; though,in some embodiments, the validator node devices 108 a-108 b and the fullnode devices 108 c-108 d perform, at least some, overlapping functions.For example, in one or more embodiments, both the validator node devices108 a-108 b and the full node devices 108 c-108 d can service queriesfor information regarding transactions, events, or states of useraccounts.

Additionally, as shown in FIG. 1 the computer nodes 114 include theledger transaction system 106. In particular, in one or moreembodiments, the ledger transaction system 106 utilizes the computernodes 114 to execute transactions and service queries for information.For example, the ledger transaction system 106 can use the validatornode devices 108 a-108 b to execute transactions and implement aconsensus protocol. Further, the ledger transaction system 106 canutilize the full node devices 108 c-108 d to receive and service queriesfor information.

For example, in one or more embodiments, the ledger transaction system106 implements a Byzantine-fault-tolerant consensus approach.Specifically, in some embodiments, the validator node devices 108 a-108b implement a modified HotStuff consensus protocol. In particular, inone or more embodiments, the computer nodes 114 select a lead validatornode device to drive consensus for a transaction block. In one or moreembodiments, the lead validator node device is selecteddeterministically (e.g., via a round-robin selection from a pre-definedlist). In some embodiments, the lead validator node device is selectednon-deterministically (e.g., candidate validator node devices attempt tosolve a cryptographic puzzle or participate in a cryptographic lottery,and the winner becomes the lead validator node device). When selected, alead validator node device can assemble a transaction block containingtransactions received from one or more of the client devices 112 a-112 nand propose the transaction block to the other validator node devices.The other validator node devices execute the transactions within thetransaction block and then vote on the execution results.

For example, assume that there exists a fixed, unknown subset ofmalicious validator node devices (also known as “Byzantine validatornode devices) within the current set of validator node devices. Assumefurther that all other validator node devices (known as “honestvalidator node devices”) follow the consensus protocol scrupulously.Referring to the total voting power of all validator node devices as Nand defining a security threshold f, the ledger transaction system 106can operate so that N>3f. In other words, the ledger transaction system106 can operate so that the combined voting power of the malicious nodedevices does not exceed the security threshold f.

A subset of nodes whose combined voting power M verifies a transactionblock (i.e., M≥N−f) can be referred to as a quorum. In some embodiments,the ledger transaction system 106 can further operate under a “BFTassumption” that indicates, for every two quorums of nodes in the sameepoch, there exists an honest node that belongs to both quorums.

Upon determining that a threshold number of votes confirming theexecution results have been received, the lead validator node device candetermine to finalize the block of transactions and transmitconfirmation to the other validator node devices. As mentioned above, byutilizing a Byzantine failure model, the ledger transaction system 106can accommodate validators that arbitrarily deviate from the protocolwithout constraint. Moreover, the ledger transaction system 106 canutilize a byzantine fault tolerance consensus approach to mitigatefailures caused by malicious or hacked validators. Specifically, in oneor more embodiments, the ledger transaction system 106 utilizes 2f+1votes as the threshold number of votes, where f refers to a number ofByzantine voters (e.g., malicious, fraudulent, or untrustworthyvalidators) that can be accommodated by the consensus protocol. Forinstance, in some embodiments f reflects the number of Byzantine votersthat can be accommodated while preventing attacks or other unsafebehaviors (e.g., double-spends or forks). In some embodiments, 2f+1votes corresponds to just over two-thirds of the validator node devicesparticipating in consensus.

Once the block of transaction is finalized, the validator node devicescan commit the transaction results to storage. Indeed, in one or moreembodiments, each validator node device generates data structures forstoring data relevant to the digital ledger (e.g., a transaction datastructure, a state data structure, and an event data structure). Thevalidator node devices can update these data structures based on theexecution results when the execution results achieve consensus. Inparticular, each validator node device can generate and maintain anindependent copy of the data structures and then update the datastructures stored at that validator node device based on the executionresults.

To provide an additional example, in one or more embodiments, a fullnode device can receive a query for information. In response, the fullnode device can locate the relevant data within the data structuresstored at the full node device and transmit the data to the requestingclient device. Indeed, in one or more embodiments, each full node devicecan generate and maintain an independent copy of the data structures.The full node device can communicate with the validator node devices 108a-108 b to identify the results of executing transactions and update thedata structures stored at the full node device accordingly. In one ormore embodiments, the full node device can further submit a proof (e.g.,a Merkle proof) to demonstrate the accuracy of the provided data inresponse to receiving the query for information.

In one or more embodiments, the client devices 112 a-112 n includecomputer devices that allow users of the devices (e.g., the users 116a-116 n) to submit transaction requests and queries for information. Forexample, the client devices 112 a-112 n can include smartphones,tablets, desktop computers, laptop computers, or other electronicdevices (examples of which are described below in relation to FIG. 50).The client devices 112 a-112 n can include one or more applications(e.g., the client application 110) that allow the users 116 a-116 n tosubmit transaction requests and queries for information. For example,the client application 110 can include a software application installedon the client devices 112 a-112 n. Additionally, or alternatively, theclient application 110 can include a software application hosted on oneor more servers, which may be accessed by the client devices 112 a-112 nthrough another application, such as a web browser.

In some embodiments, a subset of the client devices 112 a-112 n (and/ora subset of the computer nodes 104) can have cryptographic keys tomodify or manage features of the distributed digital ledger transactionnetwork (referred to as “authorized devices”). In particular, smartcontracts can be implemented that provide authorized devices (orauthorized accounts corresponding to authorized devices) withpermissions to make modifications through consensus protocols (andcollective agreement among the authorized devices). For example, withinthe confines of smart contracts used to make modifications, authorizeddevices can manage changes to the set of validator node devicesparticipating in consensus (i.e., voting rights), changes to theprocesses utilized in validating rejections or distributing transactionfees (i.e., gas) amongst the computer nodes 114, and/or changes totangible monetary reserves (e.g., diverse real-world assets) utilized toback digital assets (e.g., a cryptographic currency) on the distributeddigital ledger transaction network.

In one or more embodiments, the distributed digital ledger transactionnetwork 100 further includes one or more reporting managers (not shown).The reporting manager can track and report actions taken by thecomponents of the distributed digital ledger transaction network 100(e.g., one of the validator node devices 108 a-108 b) for which rewardsshould be provided or fees extracted. Some actions that the reportingmanager can track and report include, but are not limited to, a clientdevice submitting a transaction request, a lead validator node deviceproposing or failing to propose a transaction block, a lead validatornode device proposing an incorrect or malformed transaction block,validator node devices participating in consensus, validator nodedevices committing a block of transactions to storage, and generalinformation dissemination (whether among the computer nodes 114 or tothe client devices 112 a-112 n). In one or more embodiments, thereporting manager reports such actions to the computer nodes 114 todetermine and carryout the corresponding reward or fee. The reportingmanager can be implemented by any of the devices of the distributeddigital ledger transaction network 100 shown in FIG. 1 (e.g.,implemented by a computer nodes 114) or another computing device.

The ledger transaction system 106 can be implemented in whole, or inpart, by the individual elements of the distributed digital ledgertransaction network 100. Indeed, although FIG. 1 illustrates the ledgertransaction system 106 implemented with regards to the computer nodes114, different components of the ledger transaction system 106 can beimplemented in any of the components of the distributed digital ledgertransaction network 100. In particular, part of, or all of, the ledgertransaction system 106 can be implemented by a client device (e.g., oneof the client devices 112 a-112 n).

To provide an example, the ledger transaction system 106 can utilize theclient devices 112 a-112 n to perform various functions. To illustrate,the ledger transaction system 106 can utilize a client device to pollone or more of the computer nodes 114 for transaction event updates andrequest data corresponding to a sequence of events. Additionally, theledger transaction system 106 can utilize a client device to generate atransaction request. In particular, the ledger transaction system 106can utilize a client device to identify a main public address identifierand sub-address identifier corresponding to a user account and thenencrypt the sub-address identifier using an encryption key. The ledgertransaction system 106 can then utilize the client device to generateand submit a transaction request associated with the user account usingthe main public address identifier and the encrypted sub-addresscorresponding to that user account.

B. Validator Components and Transaction Process

As mentioned above, a client device can submit a request for atransaction to one of the computer nodes. The validator node devices ofthe distributed digital ledger transaction network can then execute thetransaction (as part of a block of transactions) and implement theconsensus protocol. If consensus is achieved, the validator node devices(and the full node devices) can commit the execution results topermanent storage by updating the data structures stored therein (e.g.,updating the ledger state). FIG. 2 illustrates a schematic diagram ofthe components of a validator node device used in processing receivedtransactions, executing the transactions, and committing thetransactions to storage based on whether consensus is achieved.

The following discussion in relation to FIG. 2 will provide detailsregarding the lifecycle of a transaction and additional details in thecontext of the illustrated validator node device components implementingthe ledger transaction system 106. The validator node device componentscan communicate with one another using any appropriate communicationprotocol. For example, in one or more embodiments, the validator nodedevice components communicate via GRPC streams with protobufserialization.

As shown in FIG. 2, a client device 202 can utilize a client application204 (e.g., the ledger transaction system 106 operating at the clientdevice 202, an application accessing the ledger transaction system 106,or a third-party wallet application) to generate a transaction request.In one or more embodiments, the client application 204 generates atransaction request by generating a transaction script having variousparameters. In one or more embodiments, the client application 204utilizes a pre-defined transaction script accessible to the clientapplication 204 and inserts the desired parameters into the pre-definedscript. The resulting transaction script can provide details for therequested transaction, such as a transfer of one or more digital assetsfrom a first user account (i.e., the user account associated with theuser of the client device 202) to a second user account.

In one or more embodiments, the client device 202 further utilizes theclient application 204 to add a sequence number to the transactionrequest. Indeed, in one or more embodiments, a validator node devicerejects transaction requests having an incorrect sequence number. Insome embodiments, computer nodes of the distributed digital ledgertransaction network can store the current sequence number associatedwith a user account. The client application 204 can query one of thecomputer nodes to identify the current sequence number associated withthe corresponding user account. The client application 204 can thenincrement the sequence number and add the incremented sequence number tothe transaction request. The computer nodes can update the sequencenumber associated with the user account in storage upon application ofthe transaction (e.g., execution of the transaction or acceptance of thetransaction into the mempool manager). In one or more embodiments,however, the client application 204 keeps track of the current sequencenumber associated with the user account to avoid querying the computernodes.

Additionally, the client device 202 can utilize the client application204 to sign the transaction request. For example, the client applicationcan utilize a private key associated with the user of the client device202 (i.e., associated with the sending user account) to apply asignature to the transaction request (e.g., by encrypting thetransaction request). The client device 202 can then transmit the signedtransaction request to the validator node device 206.

In one or more embodiments, the client device 202 submits thetransaction to a particular address associated with the validator nodedevice 206. For example, the client device 202 can submit thetransaction to an address associated with an admission control component(e.g., the admission control(s) 210) of the validator node device 206.In one or more embodiments, the client device 202 utilizes the clientapplication 204 to identify the address of the validator node device206. For example, the client device 202 can utilize the clientapplication 204 to contact the computer nodes of the distributed digitalledger transaction network and then identify the address of thevalidator node device 206 via a round-robin DNS implementation,optimized based on geographic location to reduce latency. In one or moreembodiments, upon receiving the transaction request, the validator nodedevice 206 signs the transaction request (e.g., using a private keystored in the privacy signature manager 216) and returns the signedtransaction request back to the client device 202.

As shown in FIG. 2, the validator node device 206 can receive thetransaction request at the load balancer 208. In particular, as shown inFIG. 2, the validator node device 206 includes admission control(s) 210,which can include multiple admission control units. The load balancer208 can forward tasks to the admission control(s) 210 to avoidoverwhelming the admission control units and improve the efficiency withwhich transaction requests are processed.

Indeed, the admission control(s) 210 can manage multiple request types.In particular, in addition to transaction requests, the admissioncontrol(s) 210 can manage queries for information. The admissioncontrol(s) 210 can direct a given request to the proper components ofthe validator node device 206 utilized to service that request. Forexample, the admission control(s) 210 can direct transaction requests tothe mempool manager 212 and direct queries for information to thestorage manager 220 to perform the requested reads. Accordingly, theadmission control(s) 210 can prevent a query for information frominterfering with components used to service a transaction request andvice versa.

Upon receiving a transaction request, the admission control(s) 210 canperform a series of initial checks. For example, in one or moreembodiments, the admission control(s) 210 performs basic spam checks tolimit the amount of data received from a given IP address. In doing so,the admission control(s) 210 can provide DDoS protection by performingblacklisting and filtering out invalid or high-volume input, preventingsuch input from wasting the resources of the subsequent components.Indeed, in some embodiments, the admission control(s) 210 blacklistsIPs/user accounts that generate high volumes of traffic.

The admission control(s) 210 can then access the virtual machine 222 toperform a series of additional checks in order to determine whether thetransaction request is properly formed. For example, admissioncontrol(s) 210 can check the input signature(s) on the transactionrequest to determine whether the transaction request is properly signed;check the authentication key of the user account (e.g., the address ofthe user account or the hash of the public key associated with the useraccount) sending the transaction request to confirm that theauthentication key corresponds to the public key whose private key wasused to sign the transaction; verify that the sequence number for thesigned transaction is correct; verify that the transaction scriptincluded in the transaction request is not malformed; and verify thatthere is sufficient balance in the account to support the maximum amountof gas that may be consumed upon execution of the transaction. Upondetermining that the transaction request satisfies the series of checks,the admission control(s) 210 can forward the transaction request to themempool manager 212.

In one or more embodiments, the virtual machine 222 can implement abytecode verifier and a bytecode interpreter for the programminglanguage utilized by the ledger transaction system 106. Indeed, in oneor more embodiments the ledger transaction system 106 utilizes aprogramming language with three different program representations:source code, intermediate representation (IR), and bytecode. Programmerscan develop modules and transaction scripts in IR, which is high-levelenough to write human-readable code, yet low-level enough to have adirect translation to bytecode. In some embodiments, both the sourcelanguage and IR are compiled into bytecode.

The ledger transaction system 106 can use a verifiable bytecode languageas the executable representation of the programming language for avariety of reasons. For example, in some embodiments the ledgertransaction system 106 applies safety guarantees to all programs.Enforcing these guarantees in a compiler is often not sufficientinasmuch as an adversary could choose to bypass the compiler by writingmalicious code directly in the bytecode language (unless running thecompiler is part of transaction execution, but this would make executionslower and more complex). Thus, the ledger transaction system 106 canavoid trusting the compiler by enforcing safety guarantees via bytecodeverification: type safety, reference safety, and resource safety.

Further, the virtual machine 222 can use a stack-based bytecode languagethat has fewer instructions than a higher-level source language. Inaddition, each instruction has semantics that can be expressed via aneven smaller number of atomic steps. This reduces the specificationfootprint of the ledger transaction system 106 and makes it easier tospot implementation mistakes.

As mentioned above, the virtual machine 222 can implement a bytecodeverifier and a bytecode interpreter for the bytecode language. Thebytecode language can include a stack-based virtual machine with aprocedure-local operand stack and registers. Unstructured control-flowcan be encoded via gotos and labels.

A developer can write a transaction script or module in IR that can thenbe compiled into the bytecode language. Compilation converts structuredcontrol-flow constructs (e.g., conditionals, loops) into unstructuredcontrol-flow and converts complex expressions into a small number ofbytecode instructions that manipulate an operand stack. The virtualmachine 222 can execute a transaction by verifying then running thisbytecode.

The virtual machine 222 can support various types and values: Booleans,unsigned 64-bit integers, 256-bit addresses, fixed-size byte arrays,structs (including resources), and references. In some embodiments,struct fields cannot be reference types, which prevents storage ofreferences in the ledger state. In some embodiments the virtual machine222 does not have a heap (local data is allocated on the stack and freedwhen the allocating procedure returns). Persistent data can be stored inthe ledger state.

The mempool manager 212 can provide an in-memory buffer of transactions.In particular, the mempool manager 212 can receive transactions providedby the admission control(s) 210 of the validator node device 206 as wellas the mempool manager of the other node devices 224 (e.g., othervalidator node devices). Indeed, the transactions managed by mempoolinclude transactions that have been submitted but not yet executed andagreed upon via consensus.

Because the mempool manager 212 manages multiple transactions (possiblymultiple transactions submitted by the same user account), the mempoolmanager 212 can perform a series of additional checks. Indeed, themempool manager 212 can perform additional checks to validate thetransaction request in light of the other manages transactions.

For example, in one or more embodiments, the mempool manager 212 checkswhether the transaction request forwarded by the admission control(s)210 conflicts with the transactions already stored. To illustrate, ifthe mempool manager 212 already stores one or more transactions sent bythe same user account that sent the transaction request forwarded by theadmission control(s) 210, the mempool manager 212 determines whether theuser account has sufficient digital assets to fund the transactionsalready stored as well as the transaction request forwarded by theadmission control(s) 210. If the mempool manager 212 determines there isa possibility that the transactions already stored will consume enoughof the user account's digital assets so that the transaction requestforwarded by the admission control(s) 210 cannot be funded, the mempoolmanager 212 can deny entry of the transaction request forwarded by theadmission control(s) 210.

Upon satisfaction of the additional checks the mempool manager 212 canaccept the transaction request (which will now be referred to as the“transaction”). In one or more embodiments, the validator node device206 can transmit a notification to the client device 202 indicating thatthe transaction has been added to the mempool manager 212. In someembodiments, the validator node device 206 further transmits the currentversion of the digital ledger (e.g., the current version of thetransaction data base or, more specifically, the transaction Merkletree). In further embodiments, the validator node device 206 transmitsan identifier to the client device 202, the identifier being uniquelyassociated with the validator node device 206. Indeed, in someembodiments, the client device 202 can include the identifier of thevalidator node device 206 in a query for the status of the transaction.

In one or more embodiments, upon entering the transaction into themempool manager 212, the validator node device 206 broadcasts (i.e.,transmits) the transaction to the other node devices 224. In one or moreembodiments, the validator node device 206 broadcasts the transaction assoon as the transaction is entered into the mempool manager 212. In someembodiments, the validator node device 206 broadcasts the transaction aspart of a periodic broadcast. In one or more embodiments, the validatornode device 206 determines the likelihood that the transaction will beincluded in the next transaction block and broadcasts the transaction tothe other node devices 224 based on that determination. For example, insome embodiments, the validator node device 206 broadcasts a transactionto the other node devices 224 only if the sequence number of thetransaction is equal to or sequential to the next sequence number forthe corresponding user account (e.g., broadcasts the transactions 2, 3,and 4 but not transactions with subsequent sequence numbers when thecurrent sequence number of the user account is 2). In one or moreembodiments, the mempool manager 212 maintains an ordered queue anddetermines the likelihood that a transaction will be included in thenext transaction block based on the ordered queue.

In one or more embodiments, upon receiving a transaction from one of theother node devices 224, the validator node device 206 performs the samechecks that are performed when receiving a transaction request from theclient device 202. For example, the validator node device 206 can usethe mempool manager 212 and/or the admission control(s) 210 to performthe same initial checks and additional checks. Accordingly, thevalidator node device 206 can prevent a malicious validator node deviceform sending an invalid or otherwise malicious transaction that couldinterfere with operation of the validator node device. In someembodiments, upon receiving a transaction from one of the other nodedevices 224, the validator node device 206 adds the transaction to theordered queue maintained by the mempool manager 212.

In one or more embodiments, the mempool manager 212 includes a mappingbetween user account addresses and pending transactions with variousindexes built on top. For example, as mentioned, the mempool manager 212can maintain an index referred to as the ordered queue that includestransactions that are ready to be included in the next transactionblock. In one or more embodiments, the mempool manager 212 orders thetransactions within the ordered queue based on gas price, providingpriority to transactions submitted by users willing to pay higher feesper transaction. In some embodiments, though the transactions in theordered queue are ordered based on gas price, the mempool manager 212can order the transactions submitted by the same account by sequencenumber within the mapping between account addresses and pendingtransactions.

In one or more embodiments, the mempool manager 212 includestransactions that are not ready to be included in the next block in aseparate index referred to as the parking lot. The mempool manager 212can move a transaction from the parking lot to the ordered queue oncesome event indicates that the transaction is ready to be included in atransaction block (e.g., the transaction having the immediatelypreceding sequence number was broadcast to the other node devices 224).

In one or more embodiments, the mempool manager 212 limits the number oftotal transactions stored therein. In some embodiments, the mempoolmanager 212 limits the number of transactions stored from the same useraccount. In this manner, the mempool manager 212 can prevent a useraccount from constantly attacking the distributed digital ledgertransaction network.

In one or more embodiments, the mempool manager 212 applies anexpiration to the transactions stored therein. For example, the mempoolmanager 212 can apply a time to live (TTL) expiration to a transaction.The mempool manager 212 can check the TTL expiration of a transactionperiodically. In some embodiments, the mempool manager 212 applies aclient-specified expiration to a transaction. Indeed, in someembodiments, a client device submitting a transaction request canspecify an expiration for that transaction. In one or more embodiments,the mempool manager 212 enforces a minimum time on client-specifiedexpirations to prevent a client from overwhelming the validator nodedevice 206 by submitting numerous transactions with low expirationtimes. Upon determining that the transaction has expired (i.e., eitherbased on the TTL expiration or the client-specified expiration), themempool manager 212 can remove the transaction. In one or moreembodiments, the mempool manager 212 utilizes a separate component(e.g., a system TTL component) to check expirations and removetransactions accordingly.

As shown in FIG. 2, the validator node device 206 can utilize theconsensus manager 214 to order blocks of transactions and agree on theresults of execution. In other words, the consensus manager 214 appliesthe consensus protocol to a block of transactions either assembled atthe validator node device 206 or received from one of the other nodedevices 224. For example, when the validator node device 206 is selectedas the lead validating node device (i.e., via the consensus protocol),the consensus manager 214 can identify a transaction block includingtransactions stored in the mempool manager 212 (e.g., transactionsincluded in the ordered queue). The consensus manager 214 can thentransmit the transaction block to the other node devices 224.

Subsequently, the validator node device 206 can utilize the executionengine 218 to execute the transactions within the transaction block. Theother node devices 224 similarly execute the transactions within thetransaction block. As will be discussed in more detail below withregards to FIGS. 12-14B, the execution engine 218 can maintain a scratchpad data structure that stores portions of the data structures held inpermanent storage that are relevant to the transactions in thetransaction block. Indeed, the execution engine 218 can utilize thescratch pad data structure to store execution results for the block oftransactions prior to committing the execution results to permanentstorage until consensus is reached. For example, the execution engine218 can utilize the scratch pad data structure to track the executionresults for various potential paths (represented as “paralleltransaction blocks”) that the distributed digital ledger transactionnetwork may take in adding transaction blocks to the digital ledger.Additional detail regarding the scratch pad data structure is providedbelow (e.g., in relation to FIG. 12).

In one or more embodiments, the execution engine 218 utilizes thevirtual machine 222 to execute the transactions within a transactionblock. In particular, the virtual machine 222 can verify the transactionscript and modules, publish the modules (under the transaction sender'saccount), run the transaction script, determine the execution results,and run epilogue processes (e.g., charge the user for gas and incrementthe user's sequence number). In one or more embodiments, as will bediscussed in more detail below with regard to FIGS. 27-28, the virtualmachine 222 can perform parallel execution of the transactions within atransaction block by performing a preliminary execution and subsequentlydetermining the dependencies between transactions. The virtual machinecan then 222 further execute a subset of the transactions in parallelbased on the determined dependencies.

The execution engine 218 can utilize the portions of the data structuresin the scratch data pad and the execution results corresponding to thetransactions within the transaction block to determine a proposed rootvalue of the transaction tree (i.e., a “root hash”). The consensusmanager 214 can then sign the proposed root value using a private keystored at the privacy signature manager 216 and attempt to reachagreement on the proposed root value with the other node devices 224. Inone or more embodiments, if the validator node device 206 is selected asthe lead validator node device, the validator node device 206 cancommunicate with the other node devices 224 about the proposed rootvalue. Indeed, in some embodiments, the validator node device 206 (asthe lead validator node device) communicates with the other node devices224 in a series of messages that converge towards a final decision. Inone or more embodiments, the lead validator node device participates inthe communications but does not vote on the proposed root hash. Thedecision can include a final decision to accept or reject thetransactions included in the transaction block.

If enough votes (e.g., at least 2f+1 votes) are provided for the sameroot value (e.g., the proposed root value determined by the validatornode device 206), the consensus manager 214 can provide an indication,to the execution engine 218, that the transaction block (i.e., thepreviously determined result from executing the transaction block) isready to be committed to storage. In one or more embodiments, the leadvalidator node device receives the consensus votes and determineswhether the block has been finalized (i.e., whether enough votes havebeen received). The lead validator node can then transmit the indicationbased on this determination of finalization. In one or more embodiments,the indication includes the signatures of validator node devices fromthe other node devices 224 that voted to confirm the agreed upon rootvalue. In response to receiving the indication, the execution engine 218can send the corresponding execution results stored at the scratch paddata structure to the storage manager 220 to be written into permanentstorage. Additionally, the execution engine 218 can clear out the valuesfrom the scratch pad data structure that are no longer needed (e.g.,parallel transaction blocks that will not be committed to storage, aswill be discussed in more detail below).

The validator node device 206 utilizes the storage manager 220 to addthe execution results to the digital ledger. In particular, the storagemanager 220 can commit the transactions within the transaction block,including the changes to the digital ledger based on the executionresults. In one or more embodiments, the storage manager 220 furtherstores the signatures of the validator node devices that voted toconfirm the agreed-upon root value. Upon committing a transaction fromthe transaction block, the storage manager 220 (or the execution engine218) can assign a version to each transaction and store the transaction,the root value, and the version to the transaction database (e.g., thetransaction tree). The storage manager 220 can then increase the versionnumber for assignment to the next transaction. When a transaction hasbeen committed to storage, the consensus manager 214 can notify themempool manager 212, which can then delete the transaction from itsinternal storage.

In one or more embodiments, upon a failure in storing a transactionblock, the storage manager 220 will “panic” (e.g., disconnect from theexecution engine 218). Upon re-establishing a connection, the storagemanager 220 and/or the execution engine 218 will determine the currentstate of the distributed digital ledger transaction network. Forexample, in one or more embodiments, the storage manager 220 sends, tothe execution engine 218, the root value from the previously committedtransaction block, and the execution engine 218 continues from there.Additional detail regarding consensus safety upon restart is providedbelow (e.g., in relation to FIG. 36).

In one or more embodiments, the validator node device 206 furtherincludes a state sync manger component (not shown). In particular, thestate sync manager can perform synchronization operations when thevalidator node device 206 restarts or is behind the currently proposedstate of the distributed digital ledger transaction network. Forexample, if the consensus manager 214 identifies a transaction blockthat is based on a version of the digital ledger (i.e., a version of thetransaction tree) that is unknown to the validator node device 206, thestate sync manager can update the validator node device 206 to thelatest state to allow for consensus participation. To illustrate, in oneor more embodiments, the state sync manager pulls chunks of transactionsand executes the chunks (e.g., using the execution engine 218) todetermine a ledger state of the distributed digital ledger transactionnetwork that is consistent with the currently agreed upon ledger state.

In some embodiments, the validator node device 206 further includes asystem state machine manager. In particular, the system state machinemanager can perform overall node management operations, such as nodeblacklisting and bad transaction handling.

As mentioned above, in addition to servicing transaction requests, thecomputer nodes of the distributed digital ledger transaction network canservice queries for information. For example, upon receiving a query forinformation, the admission control(s) 210 of the validator node device206 can connect directly to the storage manager 220. The admissioncontrol(s) 210 can receive, from the storage manager 220, the requestedinformation along with the corresponding proof. The validator nodedevice 206 can then forward the information to the submitting clientdevice. Though the discussion of FIG. 2 is presented in the context ofthe validator node device 206, in one or more embodiments, full nodedevices of the distributed digital ledger transaction network servicequeries for information.

In one or more embodiments, the validator node device 206 (or othercomputer node of the distributed digital ledger transaction system) willrestart upon encountering a technical problem (e.g., a crash). Thecomponents of the validator node device 206 can act accordingly inresponse to, or in anticipation of, technical problems. For example, inone or more embodiments, the admission control(s) 210 loses atransaction (e.g., submitted by the client device 202) on which initialchecks are being performed upon crashing. Accordingly, the validatornode device 206 may fail to respond to the client device 202 as expected(e.g., fail to notify the client device 202 that the transaction hasbeen accepted by the mempool manager 212). Consequently, the clientdevice 202 can then resubmit the transaction.

The mempool manager 212 can similarly drop all stored transactions upona crash. In one or more embodiments, the mempool manager 212 implementswalk-ahead logging (WAL) to avoid issues associated with dropping thetransactions.

In one or more embodiments, the consensus manager 214 stores voting datato a WAL prior to submitting a vote corresponding to a transactionblock. For example, in some embodiments, the consensus manager 214utilizes the storage manager 220 to store and delete voting data asnecessary. After a crash, the consensus manager 214 can retrieve thevoting data to identify the transaction block voted on. In someembodiments, the consensus manager 214 avoids operating off blocks thatconflicts with this voting data.

In one or more embodiments, upon restart after a crash, the executionengine 218 can re-establish a connection with the consensus manager 214and retrieve transaction blocks corresponding to the voting data storedin the WAL by the consensus manager 214. The execution engine 218 canthen re-execute the transaction blocks and provide an error if theresulting root value does not match the root valued stored in the WAL.Further, the consensus manager 214 can retrieve, from the storagemanager 220, the latest committed version of the transaction tree. Ifthere are enough votes for committing another block, the consensusmanager 214 can request to commit the transaction block via execution.

If a crash occurs before adding a transaction block to permanentstorage, the storage manager 220 can re-establish a connection to theexecution engine 218. The execution engine 218 can then provide the nexttransaction block to the storage manager 220. In particular, theexecution engine 218 can re-execute the transaction block to get thewrite-sets. In some embodiments, the validator node device 206implements a callback upon completion of committing a transaction blockor a synchronous call to the storage manager 220 from the executionengine 218, after which the execution engine 218 prunes the scratch paddata structure. Further, upon committing a transaction block topermanent storage, the storage manager 220 can delete the voting datacorresponding to the transaction block stored in the WAL by theconsensus manager 214.

Each of the components of computing devices described in relation toFIGS. 1-2, may be in communication with one another using any suitablecommunication technologies. It will be recognized that although thesecomponents are shown and/or described to be separate, any of thesecomponents may be combined into fewer components, such as into a singlefacility, divided into more components, or configured into differentcomponents as may serve a particular embodiment.

The components can comprise software, hardware, or both. For example,the components 204-222 can comprise one or more instructions stored on acomputer-readable storage medium and executable by processors of one ormore computing devices. When executed by the one or more processors, thecomputer-executable instructions of the ledger transaction system 106can cause a client device and/or a server device to perform the methodsdescribed herein. Alternatively, the components 204-222 and theircorresponding elements can comprise hardware, such as a special purposeprocessing device to perform a certain function or group of functions.Additionally, the components 204-222 can comprise a combination ofcomputer-executable instructions and hardware.

Furthermore, the components 204-222 of the ledger transaction system 106may, for example, be implemented as one or more operating systems, asone or more stand-alone applications, as one or more modules of anapplication, as one or more plug-ins, as one or more library functionsor functions that may be called by other applications, and/or as acloud-computing model. Thus, the components 204-222 may be implementedas a stand-alone application, such as a desktop or mobile application.Furthermore, the components 204-222 may be implemented as one or moreweb-based applications hosted on a remote server. The components 204-222may also be implemented in a suite of mobile device applications or“apps.”

II. Storage

A. Overview

As mentioned above, a number of technical problems exist with regard tostorage of data across computing devices utilizing conventionalblockchain systems. Indeed, conventional blockchain systems are rigidand inflexible (e.g., fail to provide individual computing devices withflexible storage management options) and utilize excessive computerresources. The ledger transaction system 106 can implement storageprocesses across computing devices of a distributed digital ledgertransaction network in a manner that improves security and flexibilityand reduces storage and processing requirements. Indeed, the ledgertransaction system 106 can utilize various data structures and storageprocesses that reduce susceptibility to tampering, that allow forcomputer devices (e.g., validator nodes or full nodes) to flexiblymodify storage of the digital ledger based on local features, and thatallow for reduction of computer storage and processing overhead.

For example, in one or more embodiments, the ledger transaction system106 generates a single versioned database (e.g., a database reflectingtransactions, events, and accounts states at any particular iteration).A version number can include an unsigned 64-bit integer timestamp, whichcorresponds to the number of transactions the system has executed. Ateach version i, the database can hold a (transaction T₁, transactionoutput O_(i), ledger state S_(i)) tuple. Given an execution function f,the tuple can indicate that executing transaction T_(i) against ledgerstate S_(i-1) produces output O_(i) and a new ledger state S_(i); thatis f(S_(i-1), T_(i))→(O_(i), S_(i)). To illustrate, FIGS. 3-6 illustratedata structures utilized by the ledger transaction system 106 inaccordance with one or more embodiments. In particular, the ledgertransaction system 106 can store transactions (T_(i)) in a transactiondata structure, transaction outputs (O_(i)) as an event data structure,and a ledger state (S_(i)) as a state data structure that can be used toobtain consensus via the distributed digital ledger transaction network.

In one or more embodiments, the ledger transaction system 106 can, at aclient device, verify that a particular ledger state is correct byre-executing each transaction T_(i) in the ledger history correspondingto that ledger state and then comparing the resulting ledger state tothe particular ledger state S_(i) and transaction output O_(i) in theversioned database. This allows client devices to audit the validatornode device of the distributed digital ledger transaction network toensure that transactions are being executed correctly.

For example, FIG. 3 illustrates a state data structure 300 generated andmaintained by the ledger transaction system 106 in accordance with oneor more embodiments. As shown in FIG. 3, the state data structure 300includes a state database 302. In one or more embodiments, the statedatabase 302 includes account data 304 associated with each user accountof the distributed digital ledger transaction network. For example, theledger transaction system 106 can generate the account data for aparticular user account within the state database 302 by storing anaccount value of the user account and a hash of the account value withinthe state database 302. The account value of a given user account caninclude any type of data relevant to the user account (e.g., digitalassets held by the user account, one or more transaction event counterscorresponding to the user account, and other modules and/or resourcesstored in the user account, etc.). In one or more embodiments, theledger transaction system 106 generates the hash of the account value byapplying a hash function to the account value. As will be discussed, inone or more embodiments, the ledger transaction system 106 uses theaccount data (e.g., the account value) associated with a user account togenerate an account state representation (e.g., a hash within a stateMerkle tree) corresponding to that user account.

For instance, as further shown in FIG. 3, the state data structure 300further includes a state tree 306. In one or more embodiments, the statetree 306 includes a state Merkle tree. For example, the state tree 306can include a state Merkle tree (e.g., a sparse Merkle tree) having2^(n) leaves where a path from the root of the state tree 306 (i.e., thestate root 308) to a leaf node (i.e., one of the leaf nodes 310 a-310 e)represents an n-bit address key corresponding to the address of a useraccount. In one or more embodiments, the ledger transaction system 106utilizes the n-bit address key as the address of the corresponding useraccount.

Where the address represented by the address key corresponds to anexisting user account, the ledger transaction system 106 can store anaccount state representation within (i.e., as part of) the leaf nodeassociated with that address key. In one or more embodiments, the ledgertransaction system 106 generates an account state representation for auser account by applying a hash function to the account data associatedwith that user account to generate a hash value corresponding to theaccount data. Specifically, the ledger transaction system 106 can applythe hash function to one or more components of the account data. Forexample, in one or more embodiments, the ledger transaction system 106applies the hash function to an account value of the user account togenerate a hash of the account value (i.e., the same hash value that isstored as part of the account data for the user account). The ledgertransaction system 106 can then store the hash of the account value asthe account state representation. In some embodiments, the ledgertransaction system 106 generates the account state representation byfurther combining the hash value corresponding to the account data(e.g., the hash of the account value) with additional data (e.g., aneviction date for the user account).

In one or more embodiments, if the address key corresponds to anon-existent user account, the ledger transaction system 106 stores adefault value (e.g., an empty string) within the leaf node. As shown inFIG. 3, if all child nodes of an internal node correspond tonon-existent user accounts, the ledger transaction system can store adefault value within that internal node (represented by the defaultnodes 312 a-312 c of FIG. 3).

In one or more embodiments, the ledger transaction system 106 generatesthe root value of the state tree 306 by combining and hashing the nodevalues stored within each pair of nodes within the state tree 306.Specifically, for each internal node of the state tree 306, the ledgertransaction system 106 can combine (e.g., concatenate) the node valuesstored within the respective child nodes and then apply a hash functionto the combined value. In some embodiments, the ledger transactionsystem 106 hashes the node values stored within the child nodes and thencombines the hashed values to generate the node value for thecorresponding internal node. The ledger transaction system 106 caniteratively combine and hash node values starting at the bottom of thestate tree 306 and progressing towards the top, eventually generatingthe root value of the state tree 306. The ledger transaction system 106can then store the root value in the state root 308 of the state tree306. As such, the root value stored within the state root 308 representsthe account state of every user account of the distributed digitalledger transaction network at a particular state of the distributeddigital ledger transaction network. As will be discussed below, theledger transaction system 106 can further store the root value of thestate tree 306 within a transaction tree of the distributed digitalledger transaction network.

Further, in one or more embodiments, the ledger transaction system 106generates a state tree for each state of the distributed digital ledgertransaction network. In particular, for each transaction (or block oftransactions) executed across the distributed digital ledger transactionnetwork, the ledger transaction system 106 can generate a new state treerepresenting the state of the distributed digital ledger transactionnetwork resulting from the transaction (or block of transactions).Specifically, the new state tree can represent the account state ofevery user account after executing a block of transactions (i.e.,reflecting how the user accounts associated with those particulartransactions have changed). In some embodiments, the ledger transactionsystem 106 updates the state tree after execution of every transaction(e.g., by updating the account state representations corresponding tothe user accounts associated with the transactions).

In some embodiments, the ledger transaction system 106 represents theinitial state of the distributed digital ledger transaction network asan empty state (e.g., an empty state database). The ledger transactionsystem 106 can then generate the genesis state through a specialtransaction T₀ that defines specific modules and resources to becreated, rather than going through the normal transaction process. Theledger transaction system 106 can configure client devices and validatornode devices to accept only ledger histories beginning with a specificT₀, which is identified by its cryptographic hash.

As mentioned above, in some embodiments, the ledger transaction system106 reduces storage and processing requirements by storing a subset ofmodified nodes. For example, the ledger transaction system 106 cangenerate a state tree component having node values corresponding tochanged user account states. These node values can point to the nodevalues of previous state trees that correspond to unchanged user accountstates. In this manner, the ledger transaction system 106 can trackchanged nodes at different states without duplicating the entire statetree. In some embodiments, the ledger transaction system 106 utilizesthis approach to track multiple states while awaiting consensus andcommitting consensus state data structures to memory. Additional detailregarding storing a subset of modified nodes to track different statesis provided below (e.g., in relation to FIGS. 8-9, 14A-14B).

As both the account data 304 stored in the state database 302 and theaccount state representations stored in the state tree 306 include ahash of an account value of a user account, the state database 302 caninclude a mapping between account state representations and accountvalues of user accounts. For instance, the ledger transaction system 106can index the account value within the account data 304 using thecorresponding hash of the account value. Indeed, the ledger transactionsystem 106 can then utilize the state tree 306 to locate the accountvalue for a given user account. Specifically, the ledger transactionsystem 106 can locate the state root 308 of the state tree 306 and thentraverse the state tree 306 (e.g., using the address of the useraccount) to find the leaf node for the user account. The ledgertransaction system 106 can then identify the account staterepresentation stored within the leaf node and use the mapping of thestate database 302 to locate the account value of the user account basedon that account state representation for the user account (i.e., basedon the hash of the account value stored as part of the account staterepresentation).

In addition to generating a data structure storing data associated withaccount states, the ledger transaction system 106 can generate a datastructure storing data associated with transaction events generated uponexecution of transactions across the distributed digital ledgertransaction network. FIG. 4 illustrates an event data structure 400generated and maintained by the ledger transaction system 106 inaccordance with one or more embodiments. As shown in FIG. 4, the eventdata structure 400 includes an event tree 402. In one or moreembodiments, the event tree 402 includes an event Merkle tree (e.g., aMerkle accumulator).

In one or more embodiments, the event tree 402 corresponds to aparticular transaction executed across the distributed digital ledgertransaction network, and the leaf nodes 408 a-408 f correspond to thetransaction events generated by execution of that transaction. In otherwords, upon executing a transaction across the distributed digitalledger transaction network, the ledger transaction system 106 cangenerate any number of transaction events (i.e., zero or more).Accordingly, the ledger transaction system 106 can generate an eventtree that corresponds to that transaction and represents the transactionevents generated upon its execution.

In particular, where the ledger transaction system 106 generates one ormore transaction events upon execution of a transaction, the ledgertransaction system 106 can generate a transaction event representationcorresponding to each transaction event. The ledger transaction systemcan then store each transaction event representation within one of theleaf nodes 408 a-408 f of the event tree 402. The ledger transactionsystem 106 can generate a transaction event representation correspondingto a given transaction event by applying a hash function to one or morecomponents of the event data associated with the transaction event.

Further, in one or more embodiments, the ledger transaction system 106generates the root value of the event tree 402 as described above withreference to the root value of the state tree 306 of FIG. 3 (e.g., byiteratively combining and hashing node values). The ledger transactionsystem 106 can store the root value in the event root 406 of the eventtree 402. As such, the root value stored within the event root 406 canrepresent every transaction event associated with a transaction executedacross the distributed digital ledger transaction network. As will bediscussed below, the ledger transaction system 106 can further store theroot value of the event tree 402 within a transaction tree of thedistributed digital ledger transaction network.

Additionally, as shown in FIG. 4, the event data structure 400 alsoincludes an event database 404. In one or more embodiments, the eventdatabase 404 includes event data 410 corresponding to the transactionevents represented by the event tree 402. Indeed, in some embodiments,the event data 410 includes event data corresponding to transactionevents associated with transactions executed across the distributeddigital ledger transaction network (i.e., every transaction eventrepresented by any event tree generated by the ledger transaction system106). The event data corresponding to a transaction event can include avariety of different types of data corresponding to the transactionevent (e.g., the address within the state data structure of the useraccount associated with the transaction event, the count value of thetransaction event counter of the user account after the transactionevent was generated, details of the transaction event such as atransaction amount, etc.). As mentioned above, in one or moreembodiments, the ledger transaction system 106 uses the event datacorresponding to a transaction event to generate a transaction eventrepresentation (e.g., a hash) corresponding to that transaction event.In one or more embodiments, the event database 404 includes a mappingbetween transaction event representations and their corresponding eventdata, and the ledger transaction system 106 utilizes the event database404 to find event data based on the corresponding transaction eventrepresentation and vice versa.

In addition to data structures storing data associated with useraccounts and transaction events, the ledger transaction system 106 cangenerate a data structure storing data associated with transactionsexecuted across the distributed digital ledger transaction network. FIG.5 illustrates a transaction data structure 500 generated and maintainedby the ledger transaction system 106 in accordance with one or moreembodiments.

As shown in FIG. 5, the transaction data structure 500 includes atransaction tree 502. In one or more embodiments, the transaction tree502 includes a transaction Merkle tree. For example, the transactiontree 502 can include an append-only transaction Merkle tree (e.g., aMerkle accumulator) to which the ledger transaction system 106 appends anew leaf node for individual transactions executed across thedistributed digital ledger transaction network. As the ledgertransaction system 106 adds new leaf nodes, the transaction tree 502continues to grow. In one or more embodiments, the structure of thetransaction tree 502 with k objects is similar to a full binary tree ofsize 2^(n) where n is the smallest number such that k≤2^(n). However, asshown in FIG. 5, in some embodiments, the ledger transaction system 106replaces any empty subtree by a default node (as represented by thedefault nodes 504 a-504 b).

The ledger transaction system 106 can store, within each of the leafnodes 506 a-506 e, a transaction representation corresponding to thetransaction associated with the leaf node. In one or more embodiments,the ledger transaction system 106 generates a transaction representationcorresponding to a particular transaction by combining several datacomponents. For example, as shown in FIG. 5, the ledger transactionsystem can combine (e.g., concatenate) a signed transaction 508, a statetree root value 510, and an event tree root value 512.

The signed transaction 508 includes an authenticated representation of aparticular transaction. For example, the signed transaction 508 caninclude data identifying the transaction (e.g., with a transactionidentifier or other transaction details) that is signed utilizing aprivate key of a user account. To illustrate, a client device of a userassociated with a user account can generate the signed transaction 508by utilizing a private key corresponding to the user account to verifythat the transaction is authorized.

As shown, the ledger transaction system 106 can also utilize the statetree root value 510 in generating a transaction representation withinthe transaction tree 502. The state tree root value 510 includes theroot value stored within the state root of the state tree (e.g., thestate root 308 of the state tree 306 of FIG. 3) generated upon executionof the transaction. In other words, the state tree root value 510represents the state of the distributed digital ledger transactionnetwork after the ledger transaction system 106 has executed thatparticular transaction.

In addition, the ledger transaction system 106 can also utilize theevent tree root value 512 in generating a transaction representationwithin the transaction tree 502. The event tree root value 512 includesthe root value stored within the event root of the event tree (e.g., theevent root 406 of the event tree 402 of FIG. 4) generated upon executionof the transaction. In other words, the event tree root value 512represents events generated upon execution of the transaction. In one ormore embodiments, the ledger transaction system 106 includes less data,different data, or additional data as part of the combined datacomponents. For example, the ledger transaction system 106 can includethe execution status of the particular transaction or the gas used inexecuting the transaction.

As further shown in FIG. 5, the ledger transaction system 106 can applya hash function 514 to the combined data components and store theresulting hash value as the transaction representation within one of theleaf nodes 506 a-506 e. In one or more embodiments, however, the ledgertransaction system 106 can apply the hash function 514 to each of thedata components individually and then combine the resulting hash valuesto generate the transaction representation.

Moreover, the ledger transaction system 106 can determine values forvarious nodes in the transaction tree 502, including a root value of atransaction root 516. In particular, the ledger transaction system 106can combine node values corresponding to child nodes and then apply ahash function to the combined values to determine node values within thetransaction tree 502. The ledger transaction system 106 can iterativelycombine node values and apply a hashing function (working from thebottom of the tree to the top) to generate the root value of thetransaction tree 502.

By building the transaction tree 502 in this manner, the root value ofthe transaction root 516 of the transaction tree 502 represents acombination of events, transactions, and states. Indeed, in one or moreembodiments, by utilizing state root tree values and event tree rootvalues to generate the root value of the transaction tree, the ledgertransaction system 106 can generate a root value of the transaction treethat uniquely identifies transactions, events, and account states(historical and current) across the life of the digital ledger. In otherwords, modification to an event, account, or transaction would propagatethrough the various Merkle trees and result in a different root value ofthe transaction tree.

Though not shown in FIG. 5, in one or more embodiments, the transactiondata structure 500 further includes a transaction database. Thetransaction database can include transaction data corresponding to thetransaction representations stored within the transaction tree 502. Inone or more embodiments, the transaction database can further include amapping between the transaction data and the corresponding transactionrepresentation.

In one or more embodiments, the ledger transaction system 106 utilizes aroot value of a transaction data structure within a digital ledger toobtain consensus across the distributed digital ledger transactionnetwork. For example, FIG. 6 illustrates a representation of ledgerinformation for obtaining consensus in accordance with one or moreembodiments. As shown in FIG. 6, the ledger transaction system 106 cangain consensus with regard to ledger information 602 that includesversion information 604, a transaction tree root value 606, and aconsensus certificate hash 608.

As illustrated by FIG. 6, the ledger information 602 can include versioninformation 604. In particular, the version information 604 can includedata representing the version of the latest transaction (or transactionblock) executed across the distributed digital ledger transactionnetwork. In other words, the data stored within version information 604can represent the version of the transaction tree upon execution of thelatest transaction.

As shown in FIG. 6, the ledger information 602 can also include thetransaction tree root value 606. The transaction tree root value 606includes the root value of the transaction tree (e.g., the root value ofthe transaction root 516 of the transaction tree 502 of FIG. 5)generated by the ledger transaction system 106 as described above (i.e.,by combining and hashing node values of the transaction tree). In one ormore embodiments, the ledger transaction system 106 utilizes thetransaction tree root value 606 as a representation of the digitalledger. Indeed, as just mentioned, the root value of the transactionroot 516 can represent transactions, events, and account states acrossthe history of the digital ledger.

In one or more embodiments, the ledger transaction system 106 can storeadditional data in the ledger information 602. For example, the ledgertransaction system 106 can store the current timestamp of thedistributed digital ledger transaction network within the ledgerinformation 602. The ledger transaction system 106 can provide such data(as well as the data described above) to a client device in response toa query received from the client device.

In one or more embodiments, the validator node devices of thedistributed digital ledger transaction network utilize the ledgerinformation 602 to generate a vote and achieve consensus on the currentstate of the distributed digital ledger transaction network. As shown inFIG. 6, the ledger transaction system 106 can generate validatorsignatures (represented by the keys 610 a-610 c) from the validator nodedevices 612 a-612 c. As mentioned above, upon reaching consensusregarding the ledger information 602, the ledger transaction system 106generates validator signatures corresponding to the validator nodedevices that voted on the ledger information 602 (e.g., the validatornode devices 612 a-612 c). For example, the ledger transaction system106 can generate the validator signatures by utilizing the private keysassociated with the validator node devices 612 a-612 c to encrypt theledger information 602 corresponding to the transaction. Additionaldetail regarding obtaining consensus from validator nodes is providedbelow (e.g., in relation to FIGS. 32-33).

Upon generating the validator signatures for version N of thetransaction tree, the ledger transaction system 106 can discard oroverwrite the validator signatures for the previous version of thetransaction tree. However, in some embodiments, if execution of atransaction marks a change to the set of validator node devices, theledger transaction system 106 archives the validator signatures for theprevious version of the transaction tree (i.e., corresponding to theprevious set of validator node devices). For example, the ledgertransaction system 106 can store the validator signatures correspondingto the previous set of validator nodes within a signature datastructure.

Though not shown in the figures, the ledger transaction system 106 canutilize a signature data structure to store a validator set history anda signature history associated with the distributed digital ledgertransaction network. In particular, the validator set history caninclude the validator node devices associated with each set of validatornode devices able to vote on blocks of transactions (e.g., each set ofvalidator node devices associated with a voting epoch). In one or moreembodiments, the ledger transaction system 106 stores a complete set ofvalidator node devices by storing the public key associated with eachvalidator node device from the set. Effectively, the validator sethistory includes a history of changes to the set of validator nodedevices able to vote on blocks of transactions. The signature historycan include the validator signatures associated with each transactionexecuted across the distributed digital ledger transaction networkbefore the set of validator node devices changes (e.g., before the endof a voting epoch).

Additionally, as shown in FIG. 6, the ledger information 602 can includethe consensus certificate hash 608. The ledger transaction system 106can generate the consensus certificate hash 608 by applying a hash valueto the consensus certificate generated by the lead validator node deviceupon gathering the votes necessary from the other validator node devicesto reach consensus on the block of the transactions that includes thelatest transaction. A consensus certificate may include a quourumcertificate (referring to the “quorum” of validator node devices thatvote to verify the block of transactions). Additional detail regardingobtaining consensus, validator nodes, voting, and voting epochs isprovided below (e.g., in relation to FIGS. 31-32).

In one or more embodiments, the ledger transaction system 106 can chaintransaction blocks. Indeed, the ledger transaction system 106 can chaintransaction blocks by including, within the transaction block, theconsensus certificate hash of another transaction block. For example,the ledger transaction system 106 can include the consensus certificatehash of a pervious (e.g., the immediately preceding) transaction block.In some embodiments, the ledger transaction system 106 can include afixed consensus certificate hash value.

In one or more embodiments, each validator node device maintains a localtree of records (e.g., the transaction tree 502). The initial root ofthe tree can include a consensus certificate hash agreed upon by thecurrent set of validator node devices as part of the setup for thecurrent epoch. In particular, each branch of the local tree can includea chain of records alternating between transaction blocks and consensuscertificates. In some embodiments, when selected, a lead validator nodedevice proposes a new transaction block, usually extending the quorumcertificate of (one of) the longest branch(es) of the local tree. If theproposal is successfully broadcast, honest validator node devices canverify the data, execute the transaction block, and send back a vote tothe lead validator node device. Upon receiving enough votes that agreewith the state of the digital ledger resulting from execution of thetransaction block, the lead validator node device can create a consensuscertificate for the transaction block and broadcast it to the othervalidator node devices, extending the chain length by one. Subsequently,the ledger transaction system 106 can select a new lead validator nodedevices that will drive another round of consensus, further extendingthe chain.

Thus, the ledger transaction system 106 can utilize data structures tostore, validate, and distribute data representative of the digitalledger implemented and maintained by the distributed digital ledgertransaction network. In particular, the ledger transaction system 106can store, within the transaction data structure, data that describesevery transaction executed across the distributed digital ledgertransaction network, the transaction events resulting from thosetransactions, and how those transaction events change user accounts. Anyunauthorized modification to an event, account, or transaction willmodify the corresponding data structures, modify the ledger information,and fail to gain consensus across the distributed digital ledgertransaction network.

B. Policy for Storage Deletion

As mentioned above, conventional blockchain systems generate and store asignificant amount of data. For example, conventional systems maygenerate data regarding the transactions that have been executed acrossthe network as well as data associated with user accounts of thenetwork. Many of these conventional systems store the data on thenetwork (i.e., on computer nodes participating in the network). Theconventional systems can then use the data stored on the network toupdate the state of the network (i.e., update the digital ledgerimplemented on the network) and/or service queries for information.

As mentioned above, however, these conventional blockchain systemssuffer from technological shortcomings that result in inefficient andinflexible operation. For example, conventional blockchain systems areoften inefficient in that they store all data related to the digitalledger (i.e., the entire history of the digital ledger) on computernodes participating in the network. As the digital ledger grows, theconventional systems require more computing resources (e.g., computingmemory) from the computer nodes in order to maintain the datacorresponding to the digital ledger.

In addition to efficiency concerns, conventional blockchain systems arealso inflexible. In particular, many conventional blockchain systemsrigidly require the computer nodes participating in the network to storethe entire history of the digital ledger regardless of the role of thatcomputing device. Consequently, the conventional systems may requiresome computer nodes to store more data than is necessary to fulfilltheir respective role. Accordingly, the conventional systems often failto implement flexible storage requirements that accommodate the needs ofthe computer nodes.

One or more embodiments of the ledger transaction system 106 implementflexible storage deletion and consolidation to more efficiently managethe limited storage resources of computer nodes participating in thedistributed digital ledger transaction network. In particular, theledger transaction system 106 can utilize configurable data storagedeletion rules to remove (all or a portion of) various data structuresstored at various computer nodes across the distributed digital ledgertransaction network. Indeed, the ledger transaction system 106 canimplement different data storage deletion rules across different devicesdepending on user preferences, computing device roles or functions(e.g., validator node versus full node), or storage capabilities (e.g.,remaining storage). For example, users of computer nodes can define whatdata structures to keep (what types, what portions, or at whatfrequency), or for how long (e.g., how old). To illustrate, the ledgertransaction system 106 can receive (via a user interface of a computernodes) user interaction indicating a selection to identify accountbalances at a particular time of day each week. The ledger transactionsystem 106 can traverse the data structures (e.g., the state databaseand/or state tree), identify the pertinent nodes for the requestedinformation, and remove the remaining data. Accordingly, the ledgertransaction system 106 can flexibly determine what events, transactions,states, and/or account data to retain and/or delete at various computingdevices of the distributed digital ledger transaction network.

The ledger transaction system 106 can remove data while still retainingthe ability to validate or accurately determine consensus of historicalor proposed digital ledgers. For example, the ledger transaction system106 can remove underlying data from a database, while retaining datarepresentations (e.g., hashes) within an authenticated data structure.This approach allows the ledger transaction system 106 to confirm thevalidity of historical or proposed data structures without retaining theunderlying data used to generate the structures themselves.

In some embodiments, the ledger transaction system 106 can removedifferent portions of data structures to reduce the storage burdens atthe computer node. For example, in one or more embodiments, the ledgertransaction system 106 deletes, at a computer node, data stored in atransaction tree that corresponds to a completed subtree. In someembodiments, the ledger transaction system 106 can also consolidatesdata structures (e.g., structures reflecting different states) to reducesize and memory requirements. To illustrate, upon updating the state ofthe distributed digital ledger transaction network, the ledgertransaction system 106 can generate a state tree component (rather thanan entire state tree) that points to the node values of previous statetrees that correspond to unchanged user account states.

In one or more embodiments, the ledger transaction system 106 appliesdifferent storage deletion rules to different computing devices (e.g.,different rules depending on whether the computer node is a full nodedevice or a validator node device). In some embodiments, the ledgertransaction system 106 deletes and/or consolidates data structures basedon the capabilities or preferences of the particular computer node. Inthis manner, the ledger transaction system 106 can flexibly applydifferent storage deletion and consolidation rules to improve theefficiency of storage resources.

For example, FIG. 7 illustrates the ledger transaction system 106deleting a portion of a transaction tree stored at computer nodes inaccordance with one or more embodiments. As shown in FIG. 7, the ledgertransaction system 106 analyzes a transaction tree 702 stored at avalidator node device 730. As mentioned above, the leaf nodes 704 a-704f of the transaction tree 702 correspond to individual transactionsexecuted across the distributed digital ledger transaction network.Indeed, as new transactions are executed across the distributed digitalledger transaction network, the ledger transaction system 106 appendsnew leaf nodes corresponding to those transactions to the transactiontree 702.

In one or more embodiments, however, the ledger transaction system 106can determine that the validator node device 730 will not servicequeries for information. For example, the ledger transaction system 106can determine that there are a sufficient number of full node devicesparticipating in the distributed digital ledger transaction network torespond to queries for information. In determining that the validatornode device 730 will not service queries, the ledger transaction system106 can determine to maintain only those nodes of the transaction tree702 (e.g., maintain the data stored within those nodes) necessary forthe validator node device 730 to perform the validation role. Thus, theledger transaction system 106 can apply a set of storage deletion rulesto delete the tree nodes (e.g., delete the data stored within thosenodes) that are not necessary for validation in order to reduce theamount of storage utilized in storing the transaction tree 720.

For example, in one or more embodiments, the ledger transaction system106 determines that a subtree is complete and deletes the child nodesincluded in that subtree while maintaining the root node of thatsubtree. In one or more embodiments, the ledger transaction system 106determines that a subtree is complete when every node in that subtreehas two child nodes (except for the leaf nodes).

For example, as shown in FIG. 7, the ledger transaction system 106determines that the subtree from the internal node 706 c is full (e.g.,complete or populated). In response, the ledger transaction system 106deletes the leaf nodes 704 a-704 d and the internal nodes 706 a-706 b(represented by the dashed lines) corresponding to the subtree. It willbe appreciated the deleting the leaf nodes 704 a-704 d can also includedeleting entries in a database corresponding to the transaction tree702. The ledger transaction system 106 maintains the internal node 706 cas the root node of that subtree.

Similarly, the ledger transaction system 106 determines that the subtreefrom the internal node 706 d is full. In response, the ledgertransaction system 106 deletes the leaf nodes 704 e-704 f (and/orcorresponding database entries). The ledger transaction system 106maintains the internal node 706 d as the root node of that subtree. Ascan be seen in FIG. 7, the ledger transaction system 106 maintains thesubtree that includes the leaf node 704 g, because that subtree is notcomplete, as indicated by inclusion of the default node 708 within thatsubtree.

As the ledger transaction system 106 continues to append leaf nodes tothe transaction tree 702 in response to transaction execution, theledger transaction system 106 can continue to identify completedsubtrees and delete the child nodes of those subtrees while maintainingtheir root nodes. In one or more embodiments, the ledger transactionsystem 106 further identifies subtrees consisting of exactly one leafnode and replaces those subtrees with a single node representing theleaf node. In one or more embodiments, the ledger transaction system 106maintains the root nodes of a subtree to enable the validator nodedevice 730 to participate in validating transaction blocks. Indeed, bymaintaining the root nodes of the subtrees, the ledger transactionsystem 106 can re-evaluate the root value of the root node 710 of thetransaction tree 702 after appending a new leaf node. By maintainingroot nodes that contain hash values reflecting leaf nodes, the ledgertransaction system 106 can still verify the accuracy of a transactiontree without storing the leaf nodes originally utilized to determine thehash values at the root.

As further shown in FIG. 7, the ledger transaction system 106illustrates maintenance of a transaction tree 720 stored at a full nodedevice 740. Indeed, as shown in FIG. 7, the ledger transaction system106 implements a different storage approach for the full node device 740when compared to the validator node device 730. For example, in one ormore embodiments, the ledger transaction system 106 determines that thefull node device 740 will service queries for information. Accordingly,the ledger transaction system 106 determines that the full node device740 will store the transaction tree 720 in its entirety (e.g., store theentire history of the digital ledger). Thus, the ledger transactionsystem 106 can prevent the deletion of the transaction tree 720 or itsnodes. Rather, as shown in FIG. 7, as transactions are executed acrossthe distributed digital ledger transaction network, the ledgertransaction system 106 appends, to the transaction tree 720, new leafnodes corresponding to those transactions. Thus, the transaction tree720 stored at the full node device 740 grows with newly executedtransactions.

In addition to deleting or consolidating portions of transaction datastructures, the ledger transaction system 106 can also delete orconsolidate state data structures (or other data structures) stored at acomputer node to reduce the amount of data stored at the computer node.For example, FIG. 8 illustrates the ledger transaction system 106deleting or consolidating portions of a state tree stored at computernodes in accordance with one or more embodiments.

As shown in FIG. 8, the ledger transaction system 106 manages a statetree 804 stored at a validator node device 802. As discussed above, theleaf nodes 806 a-806 f of the state tree 804 store account staterepresentations corresponding to user accounts, and the root valuestored within the root node 808 of the state tree 804 represents thestate of accounts across the distributed digital ledger transactionnetwork. As further mentioned, as transactions are executed, one or moreuser accounts of the distributed digital ledger transaction network aremodified. Therefore, the ledger transaction system 106 can generate anew state trees to represent the state of the distributed digital ledgertransaction network resulting from each transaction (or block oftransactions). Accordingly, in some embodiments, the ledger transactionsystem 106 stores, at the computer nodes of the distributed digitalledger transaction network, every state tree within the state datastructure.

However, the ledger transaction system 106 can reduce the amount ofstorage utilized in storing the state data structure. In particular, inone or more embodiments, the ledger transaction system 106 determinesthat the validator node device 802 will not service queries forinformation, and therefore will not store state trees representingprevious states of the distributed digital ledger transaction network.Indeed, as the validator node device 802 only requires the most currentstate of the distributed digital ledger transaction network to determinethe next state, the ledger transaction system 106 can determine that thevalidator node device 802 will only store the most current state tree(or some other subset of data structures, such as the previous two statetrees).

Accordingly, as shown in FIG. 8, the ledger transaction system 106 treeoverwrites the state tree 804 to generate the state tree 820 uponexecution of a transaction. Though FIG. 8 shows the state tree 804 andthe state tree 820 as separate tree structures, this is merely forillustrative purposes to show the changes made to the state tree storedat the validator node device 802.

In particular, the ledger transaction system 106 overwrites the statetree 804 (and generates the state tree 820) by updating the node valuesstored at the state tree 804 that are modified by the transaction. Asillustrated by FIG. 8, execution of the transaction modifies useraccount D corresponding to the account state representation stored atleaf node 806 d. In response, the ledger transaction system 106overwrites the state tree 804 by updating the account staterepresentation corresponding to user account D stored at the leaf node806 d (now shown as user account D′ under state tree 820). The ledgertransaction system 106 further updates the node values stored at thenodes from which the leaf node 806 d descends (i.e., the internal node810 and the root node 808). Thus, the ledger transaction system 106 canstore, at the validator node device 802, one state tree that is updatedwith every transaction (or block of transactions) to reflect the mostcurrent state of the distributed digital ledger transaction network.

In some embodiments, rather than overwriting a state data structure, theledger transaction system 106 can generate a state data structurecomponent that reflects changes to a prior version of a state datastructure. In this manner, the ledger transactions system 106 can storemultiple versions of a state data structure, without storing theentirety of the state data structures. For example, as further shown inFIG. 8, the ledger transaction system 106 manages a state tree 832 at afull node device 830. Indeed, as shown in FIG. 8, rather than storingtwo full state trees or overwriting a previous state tree with asubsequent tree, the ledger transaction system 106 consolidates twotrees in a manner that preserves the data representations at differentstates.

For example, in one or more embodiments, the ledger transaction system106 determines that the full node device 830 will service queries forinformation. Accordingly, the ledger transaction system 106 determinesthat the full node device 830 will store, within the state datastructure, data corresponding to every state of the distributed digitalledger transaction network.

As shown in FIG. 8, the ledger transaction system 106 tree generates astate tree component 834 having node values corresponding to useraccount states modified by a transaction. Indeed, as shown in FIG. 8, atransaction modifies user account D corresponding to the account staterepresentation stored at leaf node 836 d. In response, the ledgertransaction system 106 generates the state tree component 834 bygenerating nodes to store updated node values.

In particular, as shown in FIG. 8, the ledger transaction system 106generates the state tree component 834 by generating the leaf node 836 eand storing the modified account state representation for user account D(shown as user account D′) therein. As shown, the ledger transactionsystem 106 further generates the internal node 838 and the root node840. The ledger transaction system 106 stores updated node values in theinternal node 838 (modified from the node values stored at the internalnode 842 in the previous state) and stores updated node values in theroot node 840 (modified from the node values stored at the root node 844in the previous state tree). Thus, the ledger transaction system 106utilizes the state tree component 834 to store the node values of thestate tree 832 that have changed as a result of executing thetransaction.

As shown in FIG. 8, the ledger transaction system 106 further associatesnodes of the state tree component 834 with nodes of the state tree 832that were not modified by the transaction. In particular, the internalnode 838 of the state tree component 834 points to (i.e., is associatedwith) the leaf node 836 c of the state tree 832. Therefore, the ledgertransaction system 106 generates the node value of the internal node 838of the state tree component 834 based on the unmodified node valuestored at the leaf node 836 c and the modified node value stored at theleaf node 836 e. Similarly, the root node 840 of the state treecomponent 834 points to the internal node 846 of the state tree 832.Therefore, the ledger transaction system 106 generates the root vale ofthe root node 840 of the state tree component 834 based on theunmodified node value stored at the internal node 846 and the modifiednode value stored at the internal node 838. As shown in FIG. 8, theunmodified node value stored at the internal node 846 is based on theunmodified node values stored at the leaf nodes 836 a-836 b. Thus, theledger transaction system 106 tracks modified and unmodified node valuesresulting from execution of the transaction without duplicating thestate tree 832 entirely.

In one or more embodiments, the ledger transaction system 106 canutilize state tree components to store multiple states and then deletenodes within the state tree to reduce the amount of data stored at thecomputer node. For example, a computer node can decide to transitionfrom storing multiple data structures reflecting multiple states tostoring a state data structure reflecting fewer states. FIG. 9illustrates the ledger transaction system 106 deleting portions of astate tree with a state tree component reflecting multiple differentstates trees in accordance with one or more embodiments.

As shown in FIG. 9, the ledger transaction system 106 manages a statetree 904 stored at a full node device 902. In particular, as shown inFIG. 9, the ledger transaction system 106 generates the state tree 904corresponding to a first state (labeled “S0”) and a state tree component906 corresponding to a second state (labeled “S1”). Per the discussionabove with regard to FIG. 8, the state tree component 906 includes nodevalues corresponding to user account states that have changed betweenthe first state and the second state. Further, the state tree component906 points to nodes of the state tree 904 corresponding to unchangeduser account states.

As shown in FIG. 9, the ledger transaction system 106 tracks theassociation between a particular node and its newest parent node.Indeed, while the solid lines shown in FIG. 9 represent a parent-childrelationship, the dashed lines represent a child-parent relationshipbetween a particular node and the most current associated parent node.For example, the ledger transaction system 106 associates the leaf node908 a corresponding to unmodified user account A with the root node 912of the state tree component 906. The ledger transaction system 106further associates the leaf node 908 b corresponding to outdated useraccount B with the root node 910 of the state tree 904 and the leaf node908 c corresponding to the updated user account B′ to the root node 912of the state tree component 906. In one or more embodiments, the ledgertransaction system 106 tracks the current associated parent node for achild node by appending a representation (e.g., an identifier orreference pointer) of the parent node to the node value stored at thechild node.

As shown in FIG. 9, the ledger transaction system 106 can delete nodes(or subtrees) within the state tree 904 based on the parent-childrelationships reflected in the state tree component 906. For example,the ledger transaction system 106 can determine that the full nodedevice 902 is running out of storage space. In response, the ledgertransaction system 106 can purge the full node device 902 of older dataand free up memory space for newer data (e.g., delete previous states sothat the state data structure reflects only the current state).

As shown in FIG. 9, the ledger transaction system 106 deletes alloutdated nodes (i.e., nodes having node values that do not correspond tothe current state of the distributed digital ledger transactionnetwork). In particular, the ledger transaction system 106 identifieswhich nodes have outdated node values by identifying the nodes that donot have a parent corresponding to the current state of the distributeddigital ledger transaction network. To illustrate, in order to purge thefull node device 902 of the data that corresponds to the first state butdoes not correspond to the second state, the ledger transaction system106 begins at the root node 910 of the state tree 904. The ledgertransaction system 106 checks both children of the root node 910. Asshown in FIG. 9, because the leaf node 908 a is associated with the rootnode 912 corresponding to the second state, the ledger transactionsystem maintains the leaf node 908 a. However, because the leaf node 908b is most currently associated with the root node 910, the ledgertransaction system 106 deletes the leaf node 908 b. As shown in FIG. 9,because the root node 910 of the state tree 904 only corresponds to thefirst state, the ledger transaction system 106 deletes the root node910.

In one or more embodiments, the ledger transaction system 106 stores, ateach node, the total number of associated parent nodes (e.g., byappending the total number of parents to the node value stored at thenode). The ledger transaction system 106 can then delete nodes based onthe total number of parent nodes. For example, the ledger transactionsystem 106 can identify nodes having a total number of parent nodes thatindicate the node does not correspond to the current state of thedistributed digital ledger transaction network. To illustrate, a nodefrom a state tree corresponding to the first state is associated withonly one parent node (i.e., the root node of that state tree).Accordingly, the ledger transaction system 106 can delete that node.

As mentioned, in one or more embodiments, the ledger transaction system106 can delete all nodes having outdated node values. In someembodiments, however, the ledger transaction system 106 deletes allnodes that have outdated node values corresponding to a state that isearlier than a designated state. In other words, the ledger transactionsystem 106 can identify a designated state (e.g., via input from a userof the full node device 902 or via input from an authorized device) anddelete all nodes corresponding to states that are previous to thedesignated state. In this way, the full node device 902 can maintaindata corresponding to a desired subset of states of the distributeddigital ledger transaction network.

In one or more embodiments, the ledger transaction system 106 candelete, consolidate, and store a variety of different data structures toefficiently manage storage at computer nodes. For example, in one ormore embodiments, the ledger transaction system 106 uploads datacorresponding to the most current state (or some other designated state)to another storage device and then stores all data corresponding tosubsequent states to that storage device. In some embodiments, theledger transaction system 106 determines to maintain snapshots of thehistory of states of the distributed digital ledger transaction network.As an illustration, the ledger transaction system 106 can determine tomaintain data corresponding to one in every thousand states or datacorresponding to one state out of every week. The ledger transactionsystem 106 can then delete data that does not correspond to thosestates. Accordingly, the ledger transaction system 106 can identify theimplementing computer node as one that can only service queries forinformation regarding at least one of the maintained states.

Although FIGS. 7-9 describe specific storage implementations with regardto computer nodes of a specific classification or role, the ledgertransaction system 106 can apply various storage configurations to avariety of computer nodes (e.g., validator nodes and/or full nodes). Insome embodiments, the ledger transaction system 106 implementsparticular storage configurations based on preferences at eachindividual computing device (e.g., based on interaction with userinterface elements for setting storage preferences) and/or based on theresources (e.g., memory) available to that computer node. Further,although FIGS. 7-9 provide examples with respect to transaction datastructures and state data structures, the ledger transaction system 106can similarly manage storage for a variety of other data structure types(e.g., event data structures).

As mentioned, in one or more embodiments the set of storage deletionrules and the set of storage consolidation rules are configurable. Inparticular, the ledger transaction system 106 can change the deletionrules and consolidation rules based on the changing needs of thedistributed digital ledger transaction network or based on the changingneeds or preferences of individual computer nodes. In some embodiments,the ledger transaction system 106 configures the set of storage deletionrules and/or the set of storage consolidation rules based on inputreceived from a user of a node device or from an authorized device. Insome embodiments, the ledger transaction system 106 changes the storagedeletion rules and/or the storage consolidation rules based on consensus(e.g., procedures of a smart contract executed across the distributeddigital ledger transaction network).

By implementing the set of storage deletion rules and/or the set ofstorage consolidation rules, the ledger transaction system 106 operatesmore efficiently than conventional systems. In particular, the ledgertransaction system 106 reduces the demand for storage placed on thecomputer nodes of the distributed digital ledger transaction network.Indeed, the ledger transaction system 106 reduces the computingresources utilized by the computer nodes while still allowing thecomputer nodes to maintain data corresponding to the digital ledger.

Further, the ledger transaction system 106 is more flexible thanconventional systems. For example, by managing storage based on aclassification or role of a computer node, the ledger transaction system106 flexibly narrows the use of storage to the needs of particular nodes(e.g., serving queries or participating in consensus). Further, byallowing for configurable storage approaches, the ledger transactionsystem 106 can flexibly modify or update storage management toaccommodate the changing needs of the distributed digital ledgertransaction network.

C. Account Eviction

Many conventional blockchain systems store account data for users withinstorage managed by the conventional system (e.g., a separate databasemanaged by each computer node participating in the system). As moreusers create accounts associated with the conventional systems, thedemand for storage increases, exhausting storage resources at individualcomputing devices. To avoid these issues, many conventional systemspurge their storage structures of unwanted (e.g., old) account data. Forexample, conventional blockchain systems may limit the time allotted tothe storage of account data for a particular user. When the allottedtime expires, the conventional systems may delete or overwrite theaccount data within the storage structure, allowing for the reuse ofstorage resources.

As mentioned above, however, despite these advances, conventionalblockchain systems suffer from technological shortcomings that result ininflexible and inefficient operation. For example, conventionalblockchain systems are often inflexible in that they rigidly require allparticipating computer nodes to delete account data associated with anexpired user account synchronously. To illustrate, many conventionalblockchain systems delete account data associated with an expired useraccount by broadcasting a transaction (e.g., originating from a computernode) that triggers the deletion to all computer nodes storing theaccount data. Consequently, a given computer node typically must waitfor such a transaction before deleting the account data.

In addition to flexibility concerns, conventional blockchain systems arealso inefficient. In particular, because conventional systems oftenutilize transactions to trigger the deletion of account data associatedwith expired user accounts, a computer node storing the account data maymaintain the data within its database longer than necessary.Specifically, as mentioned, a computer node may maintain the accountdata while waiting for a transaction that triggers deletion even afterhaving the computing resources (e.g., processing down-time) available tolocate and delete the data. Accordingly, conventional systems oftenutilize a significant amount of computing resources (e.g., memory) toaccommodate expired user accounts. Further, to delete an account,conventional systems generally broadcast a separate transaction totrigger deletion of the account data which further utilizes computerresources across the distributed digital ledger transaction network inexecuting and obtaining consensus on the transaction.

One or more embodiments of the ledger transaction system 106 utilizeflexible account eviction to more efficiently manage the storageresources of computer nodes within the distributed digital ledgertransaction network. In particular, as mentioned above, the ledgertransaction system 106 can generate a state data structure that storesaccount data corresponding to user accounts as well as account staterepresentations of the account data. The ledger transaction system 106can allow for lazy deletion (e.g., marking items as expired or ready fordeletion without imposing a requirement to delete the data) of accountdata across computing devices of the distributed digital ledgertransaction network. For example, the ledger transaction system 106 canstore an eviction date associated with each user account. Based on theeviction date, the ledger transaction system can determine expiration ofa user account and subsequently delete the account data from the statedata structure at a flexible time for each computing device (e.g., whencomputing resources become available for the device). In this manner,the ledger transaction system 106 enables each computer node of thedistributed digital ledger transaction network to flexibly andefficiently delete expired account data.

As mentioned above, the ledger transaction system 106 can generate astate data structure that stores account data and account staterepresentations corresponding to user accounts of the distributeddigital ledger transaction network. FIG. 10 illustrates a state datastructure 1000 generated by the ledger transaction system 106 forperforming account eviction in accordance with one or more embodiments.

As described above, and as shown in FIG. 10, the state data structure1000 includes a state database 1002 and a state tree 1004. Inparticular, the ledger transaction system 106 generates, within thestate database 1002, account data 1006 corresponding to a user accountof the distributed digital ledger transaction network. Further, theledger transaction system 106 generates an account state representation1008 corresponding to the user account within the state tree 1004 (i.e.,as part of a leaf node of the state tree 1004).

As described above, in one or more embodiments, the account staterepresentation 1008 includes a hash value 1010 corresponding to theaccount data 1006 (i.e., a hash of the account value 1016). In someembodiments, however, the account state representation 1008 includesadditional data. For example, as shown in FIG. 10, the account staterepresentation 1008 further includes a key hash value 1012 (e.g.,corresponding to the authentication key of the user account). In one ormore embodiments, the ledger transaction system 106 generates the keyhash value 1012 by generating an authentication key (e.g., setting thekey hash value 1012 to be the n-bit address key corresponding to theuser account or applying a hash function to the public key associatedwith the user account).

As shown in FIG. 10, the account state representation 1008 can furtherinclude an eviction date 1014 associated with the user account. Theledger transaction system 106 can generate the eviction date 1014 basedon one or more factors that determine how long the user account shouldremain active within the distributed digital ledger transaction network.For example, the ledger transaction system 106 can generate the evictiondate 1014 based on one or more fees paid by the user account (e.g.,rent), which may include fees to create the user account and/or feespaid to execute transactions sent by the user account on the distributeddigital ledger transaction network.

In one or more embodiments, the ledger transaction system 106 can update(i.e., modify) the eviction date 1014 associated with the user account.For example, the ledger transaction system 106 can update the evictiondate 1014 to extend the active status of the user account afterdetecting activity corresponding to the user account (e.g., afterexecuting a transaction submitted by the user account on the distributeddigital ledger transaction network). Additionally, the ledgertransaction system 106 can update the eviction date 1014 upon re-cachingthe account data 1006 associated with the user account, as will beexplained in more detail below. In one or more embodiments, the ledgertransaction system 106 sets the eviction date 1014 based on a time of alast user account access (e.g., the time of the last activity of theuser account with regard to the distributed digital ledger transactionnetwork) and a threshold value that includes a predetermined minimumlength of time that a user account may remain active before expiration.Similarly, the ledger transaction system 106 can set or update aneviction date based on rent deposit amount, a time of a transaction thattransfers digital assets from the user account, or a time of atransaction that transfers digital assets to the user account.

When the ledger transaction system 106 determines to delete the accountdata 1006 (e.g., when sufficient computing resources become available),the ledger transaction system can access the account staterepresentation 1008 to determine (or confirm) expiration of the evictiondate 1014 (i.e., the user account). In response to determiningexpiration of the eviction date 1014, the ledger transaction system 106can delete the account data 1006 (e.g., the account value 1016 andcorresponding hash 1018) from the state database 1002. As shown in FIG.10, however, the ledger transaction system 106 can still maintain theaccount state representation 1008 within the state tree 1004, allowingthe ledger transaction system 106 to re-cache the account data 1006(e.g., upon satisfaction of appropriate conditions, as discussed below).

Notably, in one or more embodiments, the ledger transaction system 106initiates the deletion of account data associated with a given useraccount without submission of a transaction event request on thedistributed digital ledger transaction network for deleting the accountdata. Rather, as mentioned, the ledger transaction system 106 caninitiate deletion of the account data at any time after expiration ofthe user account (e.g., based on preferences, settings, or capabilitiesof individual computing devices).

The ledger transaction system 106 can determine when to purge accountdata based on a variety of factors. In one or more embodiments, theledger transaction system 106 performs a periodic scan to identifyexpired user accounts and then delete the corresponding account data(and other associated data) from the state database 1002. The ledgertransaction system 106 can optimize the frequency of this periodic scanin order to more efficiently manage the computing resources available atany given time. In some embodiments, the ledger transaction system 106optimizes the periodic scan independently for each computer node (e.g.,validator node device or full node device) of the distributed digitalledger transaction network. Specifically, for a given computer node, theledger transaction system 106 can identify the computing resource of thecomputer node, determine the availability of those computing resources,and then determine how to optimize the frequency of the scan forlocating expired user accounts.

In some embodiments, the ledger transaction system 106 providesselectable options for setting conditions for purging purge accountdata. For example, the ledger transaction system 106 can provide a userinterface for selecting a time, frequency, or trigger for removingaccount data. In other embodiments, the ledger transaction system 106automatically purges account data based on a pre-defined schedule ortrigger (e.g., based on current processing power utilized by thecomputing device falling below a threshold level).

By deleting account data corresponding to an expired user accountwithout requiring a transaction event request, the ledger transactionsystem 106 provides more flexibility for managing expired user accountswhen compared to conventional systems. Specifically, the ledgertransaction system 106 can flexibly delete account data based onindividual user preferences and/or the availability of computingresources. Further, by optimizing account data deletion independentlyfor each computer node within the distributed digital ledger transactionnetwork, the ledger transaction system 106 can extend the flexibility toaccommodate the computing resources available to each individualcomputer node.

Additionally, the ledger transaction system 106 operates moreefficiently than conventional systems. As an initial matter, the ledgertransaction system 106 avoids wasting computer resources across thedistributed digital ledger transaction network in transmitting,analyzing, and executing separate transactions to remove outdatedcontent. Indeed, each individual device can remove content withouthaving to execute and gain consensus on an additional transaction. Inaddition, by allowing individual computing devices to remove accountdata at their leisure, the ledger transaction system 106 can efficientlylocate and delete account data based on the available computer resourceson individual devices. Accordingly, the ledger transaction system 106can avoid overburdening computer resources of individual devices.

In some circumstances, allowing individual computer nodes to flexiblydelete account data could potentially result in inconsistency acrosscomputer nodes. For example, a request by a client device forinformation from a user account could produce a different responsedepending on whether individual node had purged particular account data.In one or more embodiments, the ledger transaction system 106 providesflexibility while maintaining consistency by limiting access to accountsacross the distributed digital ledger transaction network (e.g., evenwhen the account data has not yet been deleted from a particulardevice).

For example, in one or more embodiments, the ledger transaction system106 rejects requests (e.g., transactions, queries, etc.) associated withthe user account that are received after expiration of the user accountand prior to deleting the account data 1006. Specifically, in someembodiments, upon receiving a request associated with the expired useraccount, the ledger transaction system 106 can access the account staterepresentation 1008 corresponding to the user account and determine thatthe eviction date 1014 (i.e., the user account) has expired. The ledgertransaction system 106 can subsequently continue with processing of thetransaction as if the account had expired. For example, the ledgertransaction system 106 can respond to the request by sending anindication (e.g., to the client device that submitted the request) thatthe user account has expired. Said differently, even while maintainingthe account data 1006 within the state database 1002, the ledgertransaction system 106 can deny access to the account data 1006 (i.e.,deny access to the user account itself) if the user account (i.e., theeviction date 1014) has expired. In this manner, the ledger transactionsystem 106 can give each computer node flexibility to delete accountdata (without initiating a separate transactions) while still ensuringconsistent behavior (e.g., response to queries) across the entiredistributed digital ledger transaction network.

As mentioned above, in one or more embodiments, the ledger transactionsystem 106 can re-cache account data that has previously been deletedfrom the state database. In particular, the ledger transaction system106 can utilize a transaction to accurately re-cache the account data.FIG. 11 illustrates of block diagram of the ledger transaction system106 re-caching account data corresponding to a user account inaccordance with one or more embodiments.

As shown in FIG. 11, the ledger transaction system 106 can identify anaccount reinstatement request associated with an expired user accountwithin a transaction 1102. The account reinstatement request can includean account address 1104 and proposed account data 1106 associated withthe expired user account. Specifically, as shown in FIG. 11, theproposed account data 1106 can include a proposed account valueassociated with the expired user account.

Subsequently, the ledger transaction system 106 can compare the proposedaccount data 1106 to the account state representation of the useraccount stored within the state tree. For example, in one or moreembodiments, the ledger transaction system 106 performs an act 1108 ofgenerating a proposed account value hash. In particular, the ledgertransaction system 106 can perform the act 1108 by applying a hashfunction to the proposed account value of the proposed account data1106.

As shown in FIG. 11, the ledger transaction system 106 can then performan act 1110 by determining the hash value at the account address fromthe state tree. For example, the ledger transaction system 106 can usethe account address 1104 from the account reinstatement request totraverse the state tree and locate the leaf node associated with theuser account. The ledger transaction system 106 can then access theaccount state representation stored within the leaf node and identifythe hash value (i.e., the hash value previously generated by applying ahash function to account data corresponding to the user account).

As illustrated, the ledger transaction system 106 can also perform anact 1112 of comparing the proposed account value hash and the hash valueat the account address. In particular, in one or more embodiments, theledger transaction system 106 determines whether the proposed accountvalue hash is equal to the hash value at the account address. Thiscomparison allows the ledger transaction system 106 to validate orverify the accuracy of the proposed account data 1106. Indeed, if theproposed account value hash matches the hash value at the accountaddress, the proposed account data 1106 matches the data deleted fromthe account. If, however, the proposed account value hash does not matchthe hash value at the account address, the proposed account data 1106does not match the data deleted from the account (e.g., the data hasbeen modified or otherwise corrupted).

As shown in FIG. 11, the ledger transaction system 106 can perform anact 1114 of re-caching the proposed account data based on thecomparison. For example, in one or more embodiments, if the proposedaccount value hash does not equal the hash value at the account address,the ledger transaction system 106 rejects the account reinstatementrequest (and, possibly, the transaction 1102 entirely). However, if theproposed account value hash does equal the hash value at the accountaddress, the ledger transaction system 106 can re-cache the proposedaccount data within the state database. In particular, in one or moreembodiments, the ledger transaction system 106 generates an entry forthe proposed account data 1106 within the state database. As mentioned,in some embodiments, based on re-caching the proposed account data 1106,the ledger transaction system 106 can update the eviction dateassociated with the reinstated user account. For example, the ledgertransaction system 106 can update the eviction date upon execution ofthe transaction 1102 that included the account reinstatement request.

By maintaining the account state representation within the leaf node ofthe state tree that is associated with a user account, even afterdeleting account data corresponding to that user account, the ledgertransaction system 106 manages storage resources more flexibly andefficiently than conventional systems. Specifically, the ledgertransaction system can flexibly delete and reinstate account dataassociated with user accounts while maintaining accuracy and security ofthe digital ledger.

D. Tracking Multiple Writes in Memory

As mentioned above, conventional blockchain systems can receive blocksof transactions and (upon consensus) execute the transactions within theblock. Indeed, through consensus protocols, such conventional systemscan identify which blocks of transactions have been agreed upon by theother computer nodes in the network. Thus, the conventional systems canadd transactions to the digital ledger based on which blocks oftransactions have achieved consensus within the network.

As mentioned above, however, conventional blockchain systems are ofteninflexible and inaccurate at determining the order in which transactions(or blocks of transactions) are to be added to the digital ledger. Forexample, many conventional blockchain systems are often inflexible inthat they rigidly add transaction blocks to the digital ledger in theorder in which those transaction blocks were received. However, this cancause issues—especially for conventional systems implementing aleader-based consensus protocol—where multiple transaction blocks arereceived at or around the same time (e.g., due to communication delays)or a new transaction block has been received before the previous blockhas been committed to storage. For instance, in the circumstance ofreceiving a new transaction block before the previous block is committedto storage, a conventional system may execute the new transaction blockbased on the previous transaction block and then determine that theprevious transaction block has been rejected by the network. This canrequire conventional systems to generate conflicting ledgers and resultin a waste of computing resources in correcting inaccurate transactionblocks committed to storage.

In addition to flexibility concerns, the conventional blockchain systemsmay also operate inaccurately. In particular, due to the failure toflexibly accommodate various issues surrounding the order in whichtransactions are added to the digital ledger, many conventionalblockchain systems may inaccurately represent the digital ledger. Forexample, one computer node participating in a network may addtransactions to the digital ledger in a different order than anothernode in the network. Thus, the two computer nodes may disagree as to thecurrent state of the digital ledger, and at least one of those computernodes may be inaccurately representing that current state.

One or more embodiments of the ledger transaction system 106 utilize ascratch pad data structure to flexibly track multiple possiblevariations of the digital ledger while waiting for consensus on one ormore transaction blocks. In particular, the ledger transaction system106 can utilize the scratch pad data structure as temporary memory inwhich to store possible (e.g., speculative) branches of execution. Forexample, the ledger transaction system 106 can identify multipletransaction blocks containing distinct transactions. In one or moreembodiments, the multiple transactions blocks include conflictingtransactions (e.g., at least two of the transaction blocks includes atransaction that withdraws a digital asset from a user account, and theuser account does not contain enough digital assets to satisfy bothtransactions). The ledger transaction system 106 can perform anexecution for each of the transaction blocks and store the results ofthe execution in the scratch pad data structure. In particular, theledger transaction system 106 can store, for each transaction block, howexecution of that transaction block modifies the current state of thedistributed digital ledger transaction network (i.e., the last statecommitted to permanent storage via consensus) independent of howexecution of the other transaction blocks modifies that state. Theledger transaction system 106 can then commit the transaction blocks topermanent storage (or reject the transaction blocks altogether) based onthe results of consensus. In this manner, the ledger transaction system106 can flexibly track possible consensus outcomes in a manner thatresults in a more accurate representation of the digital ledger.

As mentioned above, the ledger transaction system 106 can utilize thescratch pad data structure to track how execution of a transaction blockmodifies the most current committed state of the distributed digitalledger transaction network. Indeed, the ledger transaction system 106can utilize the state data structure in conjunction with the scratch paddata structure to track the various branches of execution. FIG. 12illustrates a state tree 1200 from a state data structure, the statetree 1200 representing the most currently committed state of thedistributed digital ledger transaction network in accordance with one ormore embodiments.

As shown in FIG. 12, the state tree 1200 includes a binary tree (e.g., astate Merkle tree) similar to the state tree 306 discussed above withregard to FIG. 3. In particular, the state tree 1200 includes leaf nodes1202 a-1202 p. The leaf nodes 1202 a-1202 p correspond to different useraccounts of the distributed digital ledger transaction network and storeaccount state representations corresponding to the user accounts.Further, the state tree 1200 includes the internal nodes 1204 a-1204 nhaving node values determined based on the node value of each associatedchild node. Additionally, the state tree 1200 includes the root nodehaving a root value based on the node values of all other nodes withinthe state tree 1200. The root value represents the most currentlycommitted state (labeled “S0”) of the distributed digital ledgertransaction network. The nodes of the state tree 1200 are indexed inFIG. 12 to simplify the discussion provided below.

FIG. 13 illustrates a block diagram of transaction blocks identified bythe ledger transaction system 106 in accordance with one or moreembodiments. Specifically, the transaction block 1302 represents themost recently executed and committed transaction block reflected in thestate representation and/or transaction representation on thedistributed digital ledger transaction network. Indeed, the state tree1200 of FIG. 12 corresponds to the state of the distributed digitalledger transaction network after the transaction block 1302 is committedto storage. As shown in FIG. 13, after committing the transaction block1302 (within the state tree 1200) the ledger transaction system 106identifies additional transaction blocks for modifying the committedtransaction block 1302 reflected in the digital ledger.

Specifically, FIG. 13 illustrates the ledger transaction system 106identifying the transaction block 1304, which includes two transactions.As shown, the first transaction 1306 modifies the account correspondingto the leaf node of the state tree 1200 having the index of “4” (i.e.,the leaf node 1202 c of FIG. 12). The second transaction 1308 modifiesthe account corresponding to the leaf node of the state tree 1200 havingthe index of “18” (i.e., the leaf node 1202 j of FIG. 12). As shown inFIG. 13, the ledger transaction system 106 adds the transaction block1304 to the digital ledger after the transaction block 1302. In otherwords, the ledger transaction system 106 modifies the state of thedistributed digital ledger transaction network that resulted fromcommitting the transaction block 1302 based on the transaction block1304.

As shown in FIG. 13, the ledger transaction system 106 furtheridentifies the transaction block 1310 and the transaction block 1314.The transaction block 1310 includes a first variation 1312 of a thirdtransaction that modifies the account corresponding to the leaf node ofthe state tree 1200 having the index of “8” (i.e., the leaf node 1202 eof FIG. 12). The transaction block 1314 includes a second variation 1316of the third transaction that modifies the account corresponding to theleaf node of the state tree 1200 having the index of “30” (i.e., theleaf node 1202 p of FIG. 12). Thus, as shown in FIG. 13, the ledgertransaction system 106 identifies two possible transaction blocks thatcould be committed to storage after directly committing the transactionblock 1304 (i.e., two possible branches of execution).

FIGS. 14A-14B illustrate the ledger transaction system 106 utilizing ascratch pad data structure to track the various possible results ofexecuting the transaction blocks 1304, 1310, 1314 of FIG. 13 inaccordance with one or more embodiments. In particular, FIG. 14Aillustrates the ledger transaction system 106 utilizing the scratch paddata structure to track the results of executing the transaction block1304 of FIG. 13. FIG. 14B illustrates the ledger transaction system 106utilizing the scratch pad data structure to track the possible outcomesfrom executing the transaction block 1310 or the transaction block 1314of FIG. 13.

As shown in FIG. 14A, the ledger transaction system 106 generates thestate tree component 1402 and the state tree component 1404. Inparticular, the state tree component 1402 represents the state of thedistributed digital ledger transaction network (labeled “S1”) resultingfrom the first transaction 1306 of the transaction block 1304 of FIG.13. Similarly, the state tree component 1404 represents the state of thedistributed digital ledger transaction network (labeled “S2) resultingfrom the second transaction 1308 of the transaction block 1304 of FIG.13. As shown, the root node 1408 of the state tree component 1404 pointsto the internal node 1410 of the state tree component 1402, indicatingthat the internal node 1410 has a node value that remained unchangedbetween execution of the first transaction 1306 and the secondtransaction 1308 (as explained in more detail above with reference toFIG. 8).

As shown in FIG. 14A, the state tree components 1402, 1404 include onlythose nodes needed to determine the root value of the root nodes 1406,1408, respectively. In other words, the ledger transaction system 106does not duplicate the state tree corresponding to the most currentlycommitted state (e.g., the state tree 1200 of FIG. 12) within thescratch pad data structure. Rather, the ledger transaction system 106only generates the nodes associated with node values changes (i.e.,nodes having changed node values or nodes having node values used todetermine the changed node values).

To illustrate, the state tree component 1402 includes the leaf node 1412a, which corresponds to the user account modified by the firsttransaction 1306. The state tree component 1402 also includes the leafnode 1412 b. Though the user account corresponding to the leaf node 1412b remains unchanged from the first transaction 1306, the ledgertransaction system 106 utilizes the node value of the leaf node 1412 bto determine the node value of the internal node 1414, which is furtherused to determine the root value of the root node 1406. In one or moreembodiments, the ledger transaction system 106 generates, within thescratch pad data structure, an entire state tree corresponding to thestate resulting from a transaction, rather than a state tree component.

In one or more embodiments, because the first transaction 1306 and thesecond transaction 1308 indicate the user accounts modified by thosetransactions, the ledger transaction system 106 can preload the accountstates corresponding to those user accounts before using the virtualmachine to initiate execution. Indeed, in one or more embodiments, theledger transaction system 106 preloads the account states to the virtualmachine from storage in parallel, improving execution time as thevirtual machine does not need to wait for the account states forexecution.

As shown in FIG. 14B, the ledger transaction system 106 furthergenerates the state tree component 1420 and the state tree component1422. In particular, the state tree component 1420 represents the stateof the distributed digital ledger transaction network (labeled “S3”)resulting from the first variation 1312 of the third transactionincluded in the transaction block 1310 of FIG. 13. Similarly, the statetree component 1422 represents the state of the distributed digitalledger transaction network (labeled “S3”) resulting from the secondvariation 1316 of the third transaction included in the transactionblock 1314 of FIG. 13. As with FIG. 14A, the dashed lines illustrated inFIG. 14B represent a state tree component pointing to a node of aprevious state tree component, indicating that the node value of thatnode remains unchanged from execution of the corresponding transaction.

Indeed, as shown in FIG. 14B, the state tree components 1420, 1422provide alternative states that could represent the state of thedistributed digital ledger transaction network that follows the stateresulting from committing the transaction block 1304 to storage. Indeed,the ledger transaction system 106 can identify an indication that one ofthe transaction blocks 1310, 1314 has achieved consensus (i.e., afteridentifying an indication that the transaction block 1304 has achievedconsensus). Accordingly, the ledger transaction system 106 can committhat transaction block to storage based on the execution results trackedwithin the scratch pad data structure. For example, upon achievingconsensus for one of the transaction blocks 1310, 1314, the ledgertransaction system 106 can generate a vector of transaction valuescorresponding to the agreed upon transaction block based on the statetree components stored in the scratch pad data structure. The ledgertransaction system 106 can then utilize the vector of transaction valuesto commit the execution results to storage by modifying or updating thestate data structure, the event data structure, and the transaction datastructure accordingly.

Upon committing a transaction block to storage, the ledger transactionsystem 106 can deallocate the corresponding state trees (e.g., removefrom the scratch pad data structure). The ledger transaction system 106can further deallocate any remaining nodes that do not have anassociated parent node in the scratch pad data structure. In one or moreembodiments, if one or both of the transaction blocks 1310, 1314 fail toachieve consensus, the ledger transaction system 106 can remove thecorresponding state tree component from the scratch pad data structure.In one or more embodiments, the ledger transaction system 106 clears thescratch pad data structure entirely whenever a block of transactions iscommitted to storage.

By using the scratch pad data structure to track the various possiblebranches of execution, the ledger transaction system 106 accommodatesthe reception of multiple transaction blocks more flexibly thanconventional systems. Specifically, the ledger transaction system 106can flexibly execute the transaction blocks and then temporarily storethe execution results until consensus fails or is achieved for at leastone of the blocks. Further, by temporarily storing execution results,the ledger transaction system 106 can flexibly accommodate the delaybetween executing a transaction block and obtaining consensus. Indeed,by utilizing the scratch pad data structure, the ledger transactionsystem 106 can continue to execute transaction blocks based on theexecution results of a given transaction block waiting to be committedinto storage.

Additionally, the ledger transaction system 106 operates more accuratelythan conventional systems. Indeed, due to the flexibility offered by thescratch pad data structure, the ledger transaction system 106 can moreaccurately represent the digital ledger. Specifically, because theledger transaction system 106 can use the scratch pad data structure totemporarily store the execution results of a transaction block, theledger transaction system 106 can postpone committing the executionresults to storage until the consensus on those results are achieved.Accordingly, the ledger transaction system 106 ensures that the computernodes of the distributed digital ledger transaction network committransaction blocks in the same order.

E. Proofs and Verification

As mentioned above, in one or more embodiments, a computer node (e.g., afull node device) responding to a query for information can transmit aproof, along with the requested information, to the requesting clientdevice. Indeed, in one or more embodiments, the distributed digitalledger transaction network represents a trustless system in which aclient device does not trust the computer node from which it receivesdata. Accordingly, the ledger transaction system 106 can provide, from acomputer node, a proof as evidence of the accuracy of the data.

For example, the ledger transaction system 106 can provide proof of asigned transaction at a specified version of the transaction datastructure. Additionally, the ledger transaction system 106 can provideproof of the state of a user account at a particular state of thedistributed digital ledger transaction network using the state datastructure. In further embodiments, the ledger transaction system 106 canprovide proof of a particular transaction event emitted as part of theexecution of a particular transaction using the event data structure. Asdiscussed above, the transaction data structure, the state datastructure, and the event data structure can each include a tree, such asa Merkle tree. Accordingly, in one or more embodiments, the proofsprovided by the ledger transaction system 106 include Merkle proofs.

In one or more embodiments, a proof includes three parts: a partialproof, transaction info, and a common proof. For a partial proofcorresponding to a signed transaction, the ledger transaction system 106can provide the raw data of the signed transaction. For a partial proofcorresponding to a user account state, the ledger transaction system 106can provide proof from the leaf node of the state tree corresponding tothe user account to the root node (including the associated intermediatenodes and sibling nodes in between) as well as the account data (e.g.,the account value). For the partial proof corresponding to a transactionevent, the ledger transaction system 106 can provide proof from the leafnode of the corresponding event tree to the root node (including theassociated intermediate nodes and sibling nodes in between) as well asthe event data (e.g., the transaction event details). For thetransaction info part of the proof, the ledger transaction system 106can provide the data stored within the corresponding leaf node of thetransaction tree. And for the common proof, the ledger transactionsystem 106 can provide the proof from the leaf node to the root node ofthe transaction tree (including the associated intermediate nodes andsibling nodes in between).

Upon receiving a proof of data, a client device (i.e., the ledgertransaction system 106 operating at a client device) can verify the rootvalue of the transaction tree root node against the signatures of the≥2f+1 validator node devices that signed off on that root value. Forexample, the ledger transaction system 106 can deserialize the data fromthe applicable data structure. The ledger transaction system 106 canthen determine whether the deserialized data matches an expected value.For proofs corresponding to user account states or transaction events,the ledger transaction system 106 can then iteratively hash the list ofnodes (i.e., sibling nodes) provided as part of the partial proof toobtain the root value of the corresponding tree. The ledger transactionsystem 106 can then compare the raw data of the signed transaction, theroot value of the state tree, or the root value of the event tree(whichever is applicable) to the data stored within the correspondingleaf node of the transaction tree. The ledger transaction system 106 canthen iteratively hash the list of nodes (i.e., sibling nodes) providedas part of the common proof to get the root value of the transactiontree. If the determined root value of the transaction tree has at least2f+1 signatures with the correct set of validator node devices, theledger transaction system 106 can verify the accuracy of the data. If,however, the comparisons fail at any step of verification, or if theroot value of the transaction tree does not have the required signaturesfrom the correct set of validator node devices, the ledger transactionsystem 106 can determine that the proof is invalid.

III. Addressing and Accounts

A. Overview

As previously mentioned, the ledger transaction system 106 utilizesaddresses to specify and identify user accounts on the distributeddigital ledger transaction network. For example, the ledger transactionsystem 106 can maintain an authenticated state structure that mapsaccount address keys to account values. Moreover, the ledger transactionsystem 106 can utilize addresses (or keys) included in a transaction toidentify the user accounts between which digital assets are to betransferred. The ledger transaction system 106 can further use addressesidentified within queries for information in order to retrieve theappropriate information. FIG. 15 illustrates a schematic diagram ofaddresses corresponding to user accounts of the distributed digitalledger transaction network in accordance with one or more embodiments.

As shown in FIG. 15, the ledger transaction system 106 can utilize astate tree 1502 to determine addresses corresponding to user accounts.Specifically, as mentioned above, the leaf nodes of the state tree 1502can correspond to user accounts of the distributed digital ledgertransaction network. Thus, in one or more embodiments, the address of auser account is based, at least partially, on the location of thecorresponding leaf node within the state tree.

In some embodiments, an account address is a 256-bit value. To create anew account, the ledger transaction system 106 generates a key-pair(K_(r), K_(s)) for a signature scheme and uses the cryptographic hash ofthe public verification key K_(p) as an account address a. The newaccount is created in the ledger state when a transaction sent from anexisting account invokes the create_account(a) instruction. Thistypically occurs when a transaction attempts to send digital assets toan account address a that has not yet been created.

Once the new account is created at a, the user can sign transactions tobe sent from that account using the private signing key K_(s). Asoutlined below, the user can also rotate the key used to signtransactions from the account without changing its address.

As shown in FIG. 15, the address of a user account can include a mainaddress 1504. In particular, the main address 1504 can include a mainpublic address corresponding to the digital ledger (i.e., the publicdigital ledger). Indeed, the main address 1504 identifies the useraccount corresponding to a leaf node on the state tree 1502.

As further shown in FIG. 15, the main address 1504 can be associatedwith one or more sub-addresses 1506. In particular, a sub-address canidentify a particular user account of a private digital ledgerassociated with the user account of the main address 1504. In otherwords, in one or more embodiments, a user account on the public digitalledger (i.e., a user account associated with a leaf node of the statetree 1502) manages a private digital ledger. For example, in someembodiments, the user account on the public digital ledger can includean account for a service, such as a third-party wallet or exchangeservice that serves a plurality of user accounts particular to thatservice. The service can maintain an internal database (referred to asthe “private digital ledger”) that tracks the digital assets andtransactions associated with the user accounts particular to thatservice. Accordingly, the user account associated with the main address1504 can utilize a sub-address to identify the particular user accountwithin the corresponding internal database.

Thus, a user account can be associated with a main address thatidentifies the user account within the state tree of the distributeddigital ledger transaction network. If a user account is associated witha private digital ledger, the user account can include both a mainaddress and a sub-address, where the main address provides the addressof an account on the public digital ledger (i.e., the account of theprivate digital ledger) and the sub-address identifies the user accountfrom among the plurality of user accounts managed by the private digitalledger.

B. Utilizing Encrypted Sub-Addresses for Transaction Requests

Conventional blockchain systems typically utilize addresses associatedwith user accounts when generating and executing transactions. Inparticular, many conventional systems generate transactions that specifya main address and a sub-address to identify the public ledger accountand the private ledger address, respectively, of the associated useraccounts. Accordingly, when executing a transaction associated withparticular user accounts, conventional blockchain systems ensure thecorrect user accounts are modified (e.g., digital assets are transferredto/from the correct user accounts).

However, conventional blockchain systems have a number of shortcomings,leading to inflexible and/or unsecure operation. For example,conventional blockchain systems typically execute transactions based onthe addresses associated with user accounts of a network. Accordingly,the conventional systems are often rigid in requiring input thatincludes the addresses of the user accounts in order to generate arequest for a transaction via the network. Users that seek to transactwith a user account may not have access to specific addressinginformation.

Further, many conventional blockchain systems can introduce securityconcerns by publishing the addresses of user accounts associated with atransaction on the network, allowing external entities to access thenetwork and identify those addresses. For example, even if thesesub-addresses are encrypted, conventional systems may publish the sameaddress to the network several times (e.g., if the address is associatedwith multiple transactions), allowing external entities to determinethat the same user account has been involved in multiple transactions.Conventional systems fail to incorporate privacy measures to counteracttracking and potential manipulation of this information on the network.

One or more embodiments of the ledger transaction system 106 utilizeencryption keys associated with user accounts for flexible and securesub-address encryption when generating transaction requests. Forexample, the ledger transaction system 106 can generate a request for atransaction directed to a user account by identifying a main publicaddress identifier, a sub-address identifier, and an encryption keyassociated with the user account. The ledger transaction system 106 canthen generate a non-deterministic encrypted sub-address that is uniqueto the transaction by applying the encryption key to the sub-addresswith an added nonce value. Thus, for example, the ledger transactionsystem 106 can allow a recipient account to receive a variety ofdifferent digital assets via the distributed digital ledger transactionnetwork at the same sub-address without publishing repeated accountidentifiers on the digital ledger.

For example, the ledger transaction system 106 can execute a transactionthat transfers digital assets to the owner of a recipient accountcorresponding to a main address. The owner of the recipient account canidentify that an event and corresponding transaction have occurred onthe digital ledger. The owner of the recipient account can access (e.g.,via event details or transaction details stored on event or transactiondata structures) an encrypted sub-address. The recipient account can usea private encryption key to de-encrypt the encrypted sub-address toidentify the sub-address corresponding to the transaction. The owner ofthe recipient account can then attribute the assets to a user (oraccount) corresponding to the sub-address. Thus, the owner of therecipient account can identify the user corresponding to thesub-address, but the digital ledger will not include a traceable (orrepeatable) reference to the sub-address.

Furthermore, the ledger transaction system 106 can identify mainaddresses, sub-addresses, and/or encryption keys from a variety ofdifferent public sources while still executing secure, anonymoustransactions. For instance, in one or more embodiments, the ledgertransaction system 106 identifies the main public address identifier,the sub-address identifier, and/or the encryption key from a digitalvisual code. Moreover, in some embodiments, the ledger transactionsystem 106 identifies the main public address identifier and thesub-address identifier from an email address. In other words, the ledgertransaction system 106 can generate a request for a transaction byreceiving an email address associated with the user account. In thismanner, the ledger transaction system 106 can utilize identifiers andencryption keys associated with a user account to flexibly and securelygenerate transaction requests on the distributed digital ledgertransaction network.

As mentioned above, in one or more embodiments, the ledger transactionsystem 106 utilizes a main public address identifier and a sub-addressidentifier of a user account to generate requests for transactions onthe distributed digital ledger transaction network. FIGS. 16-18illustrate the ledger transaction system 106 identifying the main publicaddress identifier and the sub-address identifier of a user account foruse in a transaction in accordance with one or more embodiments. ThoughFIGS. 16-18 show the ledger transaction system 106 operating on a clientdevice, the ledger transaction system 106 can function similarly on anydevice of the distributed digital ledger transaction network.

FIG. 16 illustrates a block diagram of the ledger transaction system 106identifying a main public address identifier and sub-address identifiersof a user account (i.e., a payee or recipient account) from a digitalvisual code in accordance with one or more embodiments. In particular,FIG. 16 illustrates the ledger transaction system 106 identifying themain public address identifier and the sub-address identifiers byscanning dynamically generated digital visual codes that encode the mainpublic address identifier and the sub-address identifiers.

For example, the ledger transaction system 106 can scan, at the clientdevice 1602, a digital visual code 1606 displayed by a computing device1604. As shown in FIG. 16, in one or more embodiments, the digitalvisual code 1606 includes a quick response (“QR”) code. The ledgertransaction system 106 (or a third-party system) can encode, within thedigital visual code 1606, a main public address identifier and asub-address identifier. The digital visual code 1606 can include avariety of different types of visual representations capable of encodingdata. Further, the computing device 1604 can include a variety forcomputing device capable of generating and/or displaying digital visualcodes (e.g., via the ledger transaction system 106).

Upon scanning the digital visual code 1606, the ledger transactionsystem 106 identifies (e.g., extracts or decodes) a main public addressidentifier 1608 and a sub-address identifier 1610 associated with a useraccount of the distributed digital ledger transaction network. As shownin FIG. 16, the main public address identifier 1608 includes a mainaddress associated with a user account of the distributed digital ledgertransaction network, and the sub-address identifier 1610 includes anencrypted sub-address associated with the user account. In one or moreembodiments, the sub-address identifier 1610 includes an unencryptedsub-address associated with the user account.

By identifying, from the digital visual code 1606, the main publicaddress identifier 1608 and the sub-address identifier 1610, the ledgertransaction system 106 can generate a request for a transactionassociated with the user account (e.g., a transaction between the useraccount and another user account). The ledger transaction system 106 canthen submit the request for the transaction for execution via thedistributed digital ledger transaction network utilizing the main publicaddress identifier 1608 and the sub-address identifier 1610.

The ledger transaction system 106 can dynamically generate digitalvisual codes unique to particular transactions (even when thetransactions involve the same destination account). For example, inrelation to as shown in FIG. 16, the ledger transaction system 106 canfurther scan, at the client device 1612, the digital visual code 1614.In particular, the digital visual code 1614 reflects information for thesame recipient account, but utilizes a different digital visual code.Specifically, the ledger transaction system 106 (or a third-partysystem) encodes, within the digital visual code 1614, an indicator ofthe main-address and a separate encrypted sub-address for the sameaccount. The client device 1612 can be the same as or different than theclient device 1602.

Upon scanning the digital visual code 1614, the ledger transactionsystem 106 can identify the main public address identifier 1608 and asub-address identifier 1610 associated with the user account. Asillustrated by FIG. 16, while the main public address identifier 1608includes the same main address associated with the user account obtainedby scanning the digital visual code 1606, the sub-address identifier1616 includes a different encrypted sub-address. Indeed, the digitalvisual codes 1606, 1614 can each provide a unique encryption for thesub-address associated with the user account. Thus, by scanningdynamically generated digital visual codes, the ledger transactionsystem 106 can generate transaction requests using the main publicaddress identifier associated with a user account and encryptedsub-addresses that are unique to each transaction request.

Moreover, by initiating transactions utilizing this approach, thedigital ledger can avoid duplicate sub-addresses trackable by externalentities. Indeed, even though multiple transactions on the digitalledger involve the same account, the digital ledger will reflect twodifferent encrypted sub-addresses that would not allow for tracking andmanipulation of repeat payments to the same account by parties externalto the transaction. Specifically, a transaction executed via thedistributed digital ledger transaction network utilizing the sub-addressidentifier 1610 would not be traceable to another transaction executedvia the distributed digital ledger transaction network utilizing thesub-address identifier 1616 (even though both transactions are directedto the same account).

In addition to using dynamically generated digital visual codes thatchange with each scan, the ledger transaction system 106 can utilize astatic digital visual code when generating a request for a transactionassociated with a user account. Further, as mentioned above, the ledgertransaction system 106 can utilize an encryption key associated with auser account when generating a request for a transaction associated withthat user account. FIG. 17 illustrates a block diagram of the ledgertransaction system 106 identifying a main public address identifier, asub-address identifier, and an encryption key associated with a useraccount from a digital visual code in accordance with one or moreembodiments.

As shown in FIG. 17, the ledger transaction system 106 scans, using theclient device 1702, a document 1704 that includes a digital visual code1706. The ledger transaction system 106 generates the digital visualcode 1706 by encoding a main public address identifier, a sub-addressidentifier, and an encryption key corresponding to a user account. Forexample, in relation to FIG. 17, the document 1704 reflects a bill boardseeking public donations of digital assets.

Although FIG. 17 illustrates the document 1704 as a printed orelectronic bill board containing a representation the digital visualcode 1706, the document 1704 can include a variety of different physicalor electronic documents that include a scannable representation of thedigital visual code 1706. As mentioned above, however, in one or moreembodiments, the digital visual code 1706 is static. In other words, thedigital visual code 1706 remains on the document 1704, unchanged (evenafter having been scanned multiple times).

Upon scanning the digital visual code 1706, the ledger transactionsystem 106 can identify (e.g., decode or extract from the digital visualcode 1706) a main public address identifier 1708, a sub-addressidentifier 1710, and an encryption key 1712 associated with a useraccount of the distributed digital ledger transaction network. As shownin FIG. 17, the main public address identifier 1708 includes a mainaddress associated with a user account of the ledger transaction system106, and the sub-address identifier 1710 includes a sub-addressassociated with the user account. In one or more embodiments, thesub-address identifier 1710 includes an encrypted sub-address for theuser account. In one or more embodiments, the encryption key 1712includes a public key associated with the main address (i.e., associatedwith the user account).

As shown in FIG. 17, after scanning the digital visual code 1706, theledger transaction system 106 can use the encryption key 1712 to encryptthe sub-address 1714 (or the encrypted sub-address). In one or moreembodiments, the ledger transaction system 106 adds a nonce value to thesub-address (or encrypted sub-address) and applies the encryption key1712 to the sub-address (or encrypted sub-address) with the nonce value.By adding a nonce value before applying the encryption key 1712, theledger transaction system 106 can generate an encrypted sub-address thatis unique to a particular transaction. Indeed, the ledger transactionsystem 106 can utilize a different nonce value for subsequent scans ofthe digital visual code 1706 (either at the client device 1702 oranother client device) to generate different encryptions for thesub-address identifier 1710.

Thus, the ledger transaction system 106 can utilize the main publicaddress identifier 1708, the sub-address identifier 1710, and theencryption key 1712 to generate a request for a transaction associatedwith a user account. In particular, the request for the transaction caninclude an encrypted sub-address that is unique to the requestedtransaction. The ledger transaction system 106 can then submit therequest for the transaction for execution via the distributed digitalledger transaction network. Moreover, by utilizing the encryption key1712 and nonce value, transactions initiated from the digital visualcode 1706 will not repeat encrypted sub-addresses that can be tracked byentities external to the transactions. Thus, for recurring payments tothe same address, which may have the same encrypted sub-address (and berecognizable as going to the same place), the ledger transaction system106 can use the encryption key (e.g., a re-encryption key) todouble-encrypt.

As mentioned above, the ledger transaction system 106 can also flexiblyand securely identify sub-addresses to initiate transactions utilizing avariety of different sources (aside from the document 1704). Inparticular, the ledger transaction system 106 can identify addresses toinitiate a transaction via the distributed digital ledger transactionnetwork utilizing an email address. For example, FIG. 18 illustrates ablock diagram of the ledger transaction system 106 identifying a mainpublic address identifier, a sub-address identifier, and an encryptionkey of a user account of the distributed digital ledger transactionnetwork based on an email address. As shown, the ledger transactionsystem 106 can identify an email address 1802 of a user corresponding toa user account of the distributed digital ledger transaction network.The email address 1802 can include a domain name 1804 and a personalemail identifier 1806.

In one or more embodiments, the ledger transaction system 106 candetermine the main address of the user account based on the domain name1804 of the email address 1802. For example, in one or more embodiments,the ledger transaction system 106 (or a third-party system such as adomain name managing system) generates domain name system text recordsthat reflect main addresses of the distributed digital ledgertransaction network. In particular, the ledger transaction system 106can generate DNS records that associate the main address of an entitywithin the distributed digital ledger transaction network with a domainaddress corresponding to the entity on the web. The ledger transactionsystem 106 can utilize DNSSEC to verify provenance of the datacorrespondence between the domain and the corresponding main address.

As illustrated in FIG. 18, upon identifying the email address 1802, theledger transaction system 106 accesses a domain name system (“DNS”)record 1810 corresponding to the domain name 1804 stored on a remoteserver 1808. The DNS record 1810 corresponding to the domain name 1804stores the main address 1812 of the user account. Accordingly, theledger transaction system 106 can identify the main address 1812 of theuser account from the DNS record 1810 based on the domain name 1804.

As shown in FIG. 18, the ledger transaction system 106 can furtheridentify an encryption key 1814 associated with the user account fromthe DNS record 1810 (e.g., a text record or another record storage atthe DNS). In some embodiments, however, the ledger transaction system106 identifies the encryption key 1814 independently from the DNS record1810. For example, in some embodiments, the ledger transaction system106 provides the personal email identifier 1806 to a remote servercorresponding to the domain name 1804 (e.g., the remote server 1808 or adifferent remote server). To illustrate, the ledger transaction system106 can transmit a REST request to an API endpoint of the remote serverfor data associated with the user account. In response, the ledgertransaction system 106 can receive the encryption key 1814 from thatremote server.

Although FIG. 18 illustrates the main address 1812 and the encryptionkey 1814 at the remote server 1808, the ledger transaction system 106can access additional information from the remote server 1808. Forexample, the ledger transaction system 106 can also obtain a differentsub-address identifier from the remote server 1808 utilizing thepersonal email identifier 1816.

Upon retrieving the main address 1812 and the encryption key 1814associated with the user account, the ledger transaction system 106 canencrypt the personal email identifier 1816 (or a different sub-addressidentifier received from the remote server 1808). In particular, theledger transaction system 106 can apply the encryption key 1814 to thepersonal email identifier 1816 to generate an encrypted sub-address. Theledger transaction system 106 can then submit a request for atransaction associated with the user account based on the main address1812 identified from the DNS record 1810 and the encrypted sub-addressgenerated by applying the encryption key 1814 to the personal emailidentifier 1806.

Utilizing this approach, the ledger transaction system 106 allows fortransactions utilizing the distributed digital ledger transactionnetwork based on the email address of a user account. For example, userscan transfer digital assets utilizing the distributed digital ledgertransaction network by sharing email addresses. Moreover, the ledgertransaction system 106 can perform these transactions without sharingconfidential account information. In addition, for repeated transactionsinvolving the same payee, the ledger transaction system 106 can avoidpublishing repeat/trackable address information corresponding to thetransactions on the digital ledger.

Though FIG. 18 illustrates the ledger transaction system 106 identifyingthe main address and sub-address of a user account based on an emailaddress of the user associated with the user account, the ledgertransaction system 106 can identify address information based on otheridentifiers. For example, in one or more embodiments, the ledgertransaction system 106 can identify the main address and sub-address ofa user account based on a telephone number of the user associated withthe user account. In some embodiments, the ledger transaction system 106can identify the main address and sub-address based on a user ID (e.g.,a social networking user ID) of the user. For example, the ledgertransaction system 106 can access repositories (e.g., repositoriesstored on remote servers) that associate telephone numbers (or user IDs)with corresponding addresses and encryption keys. To illustrate, theledger transaction system 106 can provide the telephone number (or userID) to the remote server, receive a sub-address together with anencryption key, and utilize the sub-address and the encryption key togenerate an encrypted sub-address. The ledger transaction system 106 canuse the encrypted sub-address to initiate a transaction via thedistributed digital ledger transaction network.

By using encryption keys to encrypt sub-addresses associated with useraccounts, the ledger transaction system 106 can manage the visibility ofuser accounts associated with transactions more flexibly thanconventional systems. In particular, by adding a unique nonce value tothe sub-address of a user account before encryption, the ledgertransaction system 106 can flexibly generate a unique sub-addressencryption for each transaction associated with that user account.Accordingly, the ledger transaction system 106 can preventidentification of the user account from external entities observingtransactions on the distributed digital ledger transaction network.Further, by identifying address information from address identifiers(e.g., included in an email address) associated with a user account, theledger transaction system 106 can generate transaction requests moreflexibly than conventional systems.

C. Separating and Storing Smart Contract Code and Smart Contract Data

Conventional blockchain systems are generally inflexible and rigid withregard to storage, implementation, and use of smart contracts. Forexample, many conventional blockchain systems utilize smart contracts todefine and implement programs utilizing singleton objects particular toeach program. Consequently, the smart contracts used by the conventionalsystems are inflexible in that they cannot be used or repeated across anetwork (i.e., the smart contracts are not reusable). For instance, inconventional blockchain systems, a device implementing a subsequentsmart contract that depends on a previous smart contract would be unableto flexibly interact or reference the common dependencies betweencontracts because each smart contract implements code and singletonobjects particular to each contract. In other words, conventionalsystems cannot rely on a common type class to flexibly and efficientlyreference digital assets across the distributed digital ledgertransaction network.

Additionally, conventional blockchain systems generally store associatedsmart contracts inflexibly. For example, many conventional blockchainsystems store smart contracts under an address that corresponds to thehash value resulting from applying a hash function to the smart contractcode. Accordingly, the address under which a smart contract is stored istypically unique to that smart contract. As a result, conventionalsystems typically store one smart contract per address.

One or more embodiments of the ledger transaction system 106 separatessmart contract code and smart contract data for flexible reuse of smartcontract code. Indeed, in one or more embodiments, the ledgertransaction system 106 utilizes smart contract code (referred to as“modules”) to define attributes and procedures implemented by smartcontract data (i.e., referred to as “resources”). Thus, the ledgertransaction system 106 can flexibly utilize a module to create multipleresources having duplicate properties and being governed by the sameprocedures.

Further, one or more embodiments of the ledger transaction system 106implement an addressing scheme for storing multiple smart contractsunder a single user account. Indeed, the addressing scheme allows a useraccount to store multiple modules and resources while allowing for clearidentification of a particular module or resource. Thus, the ledgertransaction system 106 can more flexibly implement smart contractsacross the distributed digital ledger transaction network.

FIG. 19 shows a schematic diagram of several user accounts 1902 a-1902 bstoring modules and resources in accordance with one or moreembodiments. As mentioned above, in one or more embodiments the ledgertransaction system 106 deconstructs smart contracts into separatemodules (representing smart contract code) and resources (representingsmart contract data). Indeed, in one or more embodiments, all of thevalues stored at a user account are represented as either a module or aresource.

In one or more embodiments, the ledger transaction system 106 treats amodule as immutable. In other words, the ledger transaction system 106can protect the module from modification or deletion. In someembodiments, however, the ledger transaction system 106 allows suchactions. The ledger transaction system 106 can generate a module thatinvokes procedures in one or more other modules. In some embodiments,however, the ledger transaction system 106 limits modules to invokingprocedures defined within other modules that were generated previouslyon the distributed digital ledger transaction network.

In one or more embodiments, the ledger transaction system 106 cangenerate multiple resources utilizing the same module. Indeed, theledger transaction system 106 can utilize a module as a template fromwhich to generate multiple resources. For example, as shown in FIG. 19,the ledger transaction system 106 stores a Currency module 1904. Usingthe Currency module 1904, the ledger transaction system 106 generatesthe Coin resources 1906 a-1906 c shown stored under different accountaddresses. Indeed, as the Coin resources 1906 a-1906 c were generatedfrom the same module (i.e., the Currency module 1904), the Coinresources 1906 a-1906 c share the same characteristics (e.g., are of thesame data type). Similarly, the ledger transaction system 106 cantransfer, manipulate, or otherwise interact with the Coin resources 1906a-1906 c using the same procedures defined within the Currency module1904. In one or more embodiments, the ledger transaction system 106 cangenerate any number of resources using the same module (subject to thecreation limits defined within the module).

Thus, by implementing smart contracts as separate modules and resources,the ledger transaction system 106 implements smart contracts moreflexibly than conventional systems. Indeed, the ledger transactionsystem 106 can flexibly reuse a single module to generate multipleresources that behave similarly. Thus, the ledger transaction system 106avoids creating an entirely new smart contract to create an objecthaving the same properties and behavior as a previously created smartcontract.

Additionally, as mentioned above, the ledger transaction system 106 canimplement an addressing scheme with reference to modules and resources.Indeed, in one or more embodiments, the ledger transaction system 106can store zero or more modules and one or more resources under the sameuser account. In one or more embodiments, the ledger transaction system106 utilizes these modules and resources via transaction scripts (e.g.,submitted as part of a transaction request). For example, a transactionscript can include calls to one or more procedures of a module withreference to a particular resource. In executing the transaction script,the ledger transaction system 106 executes the procedure calls definedwithin the module and modifies, moves, or otherwise interacts with thereferenced resource (transaction scripts will be discussed in moredetail below with reference to FIG. 23). By implementing the addressingscheme, the ledger transaction system 106 can clearly identify aspecific module and/or a specific resource. For example, the ledgertransaction system 106 can distinguish between two modules having asimilar name but stored under different addresses.

To provide an illustration, FIG. 19 shows the ledger transaction system106 storing multiple modules and/or resources within the user accounts1902 a-1902 c. Specifically, the ledger transaction system 106 storesthe Currency module 1904 and the Coin resource 1906 a under the useraccount 1902 a. Additionally, the ledger transaction system 106 storesthe Channel module 1908, the Coin resource 1906 b, and the Paymentresource 1910 under the user account 1902 b. Further, the ledgertransaction system 106 stores the Car module 1912, the Escrow module1914, and the Coin resource 1906 c under the user account 1902 c.

In one or more embodiments, the ledger transaction system 106 implementsthe addressing scheme by defining a module namespace usable for uniquelyidentifying modules. In one or more embodiments, the ledger transactionsystem 106 defines the module namespace for a particular module as thecombination of the address of the user account storing the module and anidentifier for the module itself. To illustrate, the ledger transactionsystem 106 can define the module namespace for the Currency modulestored at the user account 1902 a as “0x0.Currency.” Therefore, uponreceiving a transaction script that includes the namespace“0x0.Currency” (e.g., as part of a call to a procedure) the ledgertransaction system 106 can identify the Currency module stored at theuser account 1902 a having the address 0x0.

More specifically, the ledger transaction system 106 can utilize themodule namespace to identify a module that corresponds to a particularresource. Indeed, in one or more embodiments, the ledger transactionsystem 106 extends the module namespace by appending a resourceidentifier to the end of the module namespace. Indeed, the extendedmodule namespace identifies the type of the resource (i.e., the typedefined by the module). Accordingly, when referencing a particularresource, the ledger transaction system 106 can utilize the extendedmodule namespace to identify the module (i.e., the type) thatcorresponds to that resource. In one or more embodiments, the extendedmodule namespace represents an access path for a resource stored at agiven user account.

For example, as shown in FIG. 19, the ledger transaction system 106 canidentify the Currency module 1904 that corresponds to the Coin resource1906 a stored at the user account 1902 a using the extended modulenamespace “0x0.Currency.Coin.” As further shown in FIG. 19, the ledgertransaction system 106 can also store the Coin resources 1906 b-1906 cfrom the Currency module 1904 under the user accounts 1902 b-1902 c,respectively. Indeed, in one or more embodiments, the ledger transactionsystem 106 can store a resource under a user account that is differentfrom the user account storing the corresponding module. Thus, using theextended module namespace, the ledger transaction system 106 canidentify the Currency module 1904 stored at the user account 1902 a evenwhen referencing the Coin resource 1906 b stored at the user account1902 b or the Coin resource 1906 c stored at the user account 1902 c.Effectively, the extended module namespace indicates that the Coinresource 1906 b and 1906 c are subject to the attributes of the typesand procedures defined by the Currency module 1904.

In one or more embodiments, to identify a resource stored at aparticular user account, the ledger transaction system 106 can prefixthe extended module namespace with the address of the desired useraccount. For example, to identify the Coin resource 1906 b stored at theuser account 1902 b, the ledger transaction system 106 can utilize thecall “0x1/0x0.Currency.Coin.” Thus, the ledger transaction system 106can further differentiate among resources that have been generated usingthe same module.

In one or more embodiments, the ledger transaction system 106 limits thenumber of resources of a given type stored under the same user account.For example, in some embodiments, the ledger transaction system 106 onlystores one resource of a given type (e.g., one Coin resource from theCurrency module 1904) within a particular user account. This approachprovides a predictable schema for top-level account values—that is,every account should store its currency.coin resource in the same place.This design is not restrictive, because programmers can define wrapperresources that organize resources in a custom way (e.g., resourceTwoCoin {coin1: 0x181BD55:currency.coin, coin2:0x181BD55:currency.coin}).

Additionally, in one or more embodiments, the ledger transaction system106 only stores one module of a given name at an address. Otherwise,using the module namespace would not uniquely identify a particularmodule. However, the ledger transaction system 106 can store two moduleshaving the same name under different user accounts. For example, theledger transaction system 106 can store an additional Currency module atthe user account 1902 b. Using the module namespace “0x1.Currency,” theledger transaction system 106 could uniquely identify that additionalCurrency module.

In sum, a resource value, or resource, can include a record that bindsnamed fields to simple values (such as integers) or complex values (suchas other resources embedded inside this resource). In some embodiments,every resource has a type declared by a module. Moreover, in one or moreembodiments, resource types are nominal types which consist of the nameof the type and the name and address of the resource's declaring module.Resources can be both mutated or deleted, and, in one or moreembodiments, the rules for mutating, deleting, and publishing a resourceare encoded in the module that created the resource and declared itstype.

Similarly, a module value, or module, can include bytecode that declaresresource types and procedures. Like a resource type, in some embodimentsa module is identified by the address of the account where the module isdeclared. Further, in some embodiments, a module is uniquely namedwithin an account (e.g., each account can declare at most one modulewith a given name). Moreover, in some embodiments modules are immutable.

By implementing this address scheme to differentiate between modulesand/or resources stored at different user accounts, the ledgertransaction system can store and use smart contracts more flexibly thanconventional systems. Indeed, as mentioned, the ledger transactionsystem 106 can flexibly store a variety of different modules andresources at user accounts. The ledger transaction system 106 can thenuse the addressing scheme to define a module namespace usable foridentifying the correct module when referencing a resource. Thus, when atransaction script utilizes the module namespace (or the extended modulenamespace) to modify or otherwise interact with a resource, the ledgertransaction system 106 can correctly identify the attributes of thetypes and procedures that govern that resource. Further, the ledgertransaction system can flexibly and efficiently reference and utilizeresources across the distributed digital ledger transaction network inexecuting various smart contracts that utilize the resources.

D. Utilizing Resources to Delegate Account Permissions

As mentioned above, unlike conventional blockchain systems, the ledgertransaction system 106 can flexibly delegate account permissions todifferent user accounts. Indeed, as just discussed the ledgertransaction system 106 can store one or more resources in a user accountand can execute transactions that modify these resources (e.g., bytransferring digital assets from one user account to another useraccount). In some embodiments, the ledger transaction system 106generates a resource reflecting user account withdrawal permissions andmoves the resource to another account to flexibly delegate permissionsacross accounts. FIG. 20 illustrates a block diagram of the ledgertransaction system 106 utilizing a resource to transfer the withdrawalpermissions of a first user account to a second user account inaccordance with one or more embodiments.

As shown in FIG. 20, the ledger transaction system 106 performs an act2002 of generating a permission (i.e., a permission resource) towithdraw from the first user account. The permission to withdraw caninclude, for example, a permission to withdraw digital assets from thefirst user account (e.g., to transfer digital assets from the first useraccount to another user account). Indeed, in one or more embodiments,the ledger transaction system 106 generates the permission to withdrawby generating a resource that grants the permission to withdraw from thefirst user account. The ledger transaction system 106 can then store theresource granting the permission to withdraw (i.e., the resourceproviding the permission) at the first user account.

In one or more embodiments, the ledger transaction system 106 limits theability to withdraw from the first user account based on the permissionto withdraw. In other words, in some embodiments, the ledger transactionsystem 106 requires that a transaction attempting to withdraw from thefirst user account be associated with the permission to withdraw. Forexample, when the first user account submits a transaction request totransfer digital assets from the first user account to another useraccount, the ledger transaction system 106 can access the first useraccount to determine that the first user account has the resourcegranting the permission to withdraw.

As shown in FIG. 20, the ledger transaction system 106 performs the act2004 of delegating the permission to withdraw to a second user account.Indeed, in one or more embodiments, the ledger transaction system 106delegates the permission to withdraw by transferring the resourcegranting the permission to withdraw to the second user account. Forexample, the ledger transaction system 106 can execute a transactionacross the distributed digital ledger transaction network, submitted bythe first user account, that transfers the resource granting thepermission to withdraw to a second user account.

As shown in FIG. 20, once the resource granting the permission towithdraw has been transmitted to the second user account (e.g., theresource has been transferred on the state ledger), the first useraccount no longer has that resource. Accordingly, the first user accountno longer includes the permissions resource (and the ledger transactionsystem 106 will reject subsequent transactions initiated from the firstaccount seeking to withdraw digital assets from the first account)Indeed, in one or more embodiments, the ledger transaction system 106generates only one resource granting permission to withdraw for aparticular user account. In some embodiments, however, the ledgertransaction system 106 can generate multiple resources grantingpermission, allowing a user account to distribute the permission tomultiple recipients as desired.

As further shown in FIG. 20, the ledger transaction system 106 thenperforms the act 2006 of using the permission to withdraw from the firstuser account. Indeed, the second user account can submit a transactionrequest to withdraw digital assets, for example, from the first useraccount. Upon receiving the transaction request, the ledger transactionsystem 106 can access the second user account, determine that the seconduser account has the resource granting the permission to withdraw fromthe first user account, and then transfer the digital assets from thefirst user account to the second user account accordingly.

In one or more embodiments, the ledger transaction system 106 candelegate the permission to withdraw from a user account in order tosubject that user account to certain withdrawal limitations. Forexample, the ledger transaction system 106 can generate a cold wallet(i.e., from a cold wallet module published on the distributed digitalledger transaction network) and transfer the resource granting thepermission to withdraw from the user account to the cold wallet. As usedherein, the term “cold wallet” refers to an offline reserve of digitalassets. Having the resource granting the permission to withdraw, thecold wallet can take digital assets out of the user account and storethem within the cold wallet. The digital assets, therefore, becomesubject to the constraints (and protections) of the cold wallet. ThoughFIG. 20 illustrates utilizing a resource to delegate a permission towithdraw, the ledger transaction system 106 can utilize resources totransfer other permissions (or resources) associated with user accountsas well.

E. Decoupling Account Addresses from Cryptographic Keys

Many conventional blockchain systems use authentication keys toauthenticate user accounts sending transactions to a network. However,conventional blockchain systems are inflexible in managing theseauthentication keys. For example, conventional systems typically tieauthentication keys of a user account directly to the user accountaddress (e.g., the authentication key is the address of the useraccount). However, this presents security issues for which theconventional systems fail to offer flexible solutions. For example, ifthe authentication key of a user account becomes compromised, theconventional systems may require a user to move a user account to a newaddress to avoid account interference from a malicious party.

One or more embodiments of the ledger transaction system 106 decouplesauthentication keys from user account addresses to allow for flexibleauthentication key rotation. In particular, in one or more embodiments,the ledger transaction system 106 generates an attribute for the useraccount that stores the authentication key of the user account.Accordingly, the ledger transaction system 106 can store newauthentication keys at the user account when desired or necessary. Inthis manner, the ledger transaction system 106 can provide more flexiblesecurity that allows a user account to maintain security while avoidingthe need to move the contents of the user account to a new address.

FIG. 21 illustrates a block diagram of the ledger transaction system 106rotating authentication keys of a user account in accordance with one ormore embodiments. As shown in FIG. 21, the user account 2102 includes anaccount address 2104 and a first authentication key 2106. As mentionedabove, in one or more embodiments, when the ledger transaction system106 creates the user account 2102 on the distributed digital ledgertransaction network, the ledger transaction system 106 sets the firstauthentication key 2106 to be the account address 2104.

In one or more embodiments, the first authentication key 2106 of theuser account 2102 is further related to the public key (not shown) ofthe user account 2102. For example, in one or more embodiments, theledger transaction system 106 determines the first authentication key2106 by applying a hash function to the public key of the user account2102 and setting the first authentication key 2106 to the resulting hashvalue. Indeed, in some embodiments, when creating the user account 2102on the distributed digital ledger transaction network, the ledgertransaction system 106 can first generate the public key (and privatekey) for the user account 2102 and then determine the firstauthentication key 2106 (and the account address 2104) by applying ahash function to the public key.

When a transaction is sent from the user account 2102, the ledgertransaction system 106 can utilize the first authentication key 2106 toauthenticate the user account 2102 as the sender of the transaction. Forexample, as mentioned above, upon receiving a transaction, the ledgertransaction system 106 checks (e.g., utilizing the admission control ofthe receiving validator node device) that the first authentication key2106 corresponds to the public key related to the private key used tosign the transaction. In one or more embodiments, the ledger transactionsystem 106 checks that the first authentication key 2106 corresponds tothe public key by hashing the public key and determining that theresulting hash value matches the first authentication key 2106.

As shown in FIG. 21, the ledger transaction system 106 can send atransaction 2108 utilizing the first authentication key 2106, from theuser account 2102, to rotate out the first authentication key 2106(i.e., to get a new authentication key). As shown, the ledgertransaction system 106 transmits the transaction 2108 (referencing thefirst authentication key 2106) to the validator node devices 2110 forexecution. Then, as mentioned above, the ledger transaction system 106utilizes the first authentication key 2106 to verify that the useraccount 2102 is the source of the transaction 2108.

Upon execution of the transaction 2108, the ledger transaction system106 provides the user account 2102 with a second authentication key2112. Indeed, in some embodiments, the ledger transaction system 106generates the second authentication key 2112 by generating a new publickey and private key for the user account 2102 and determining the secondauthentication key 2112 by applying a hash function to the new publickey. For subsequent transactions sent by the user account 2102, theledger transaction system 106 can verify that the user account 2102 sentthe transaction using the second authentication key 2112.

In one or more embodiments, the ledger transaction system 106 can rotatethe authentication key for a user account any number of times. Forexample, the ledger transaction system 106 can rotate the authenticationkey for a user account every time the user account sends a transaction.In some embodiments, however, the ledger transaction system 106 preventsthe user account from rotating the authentication key multiple times ina single transaction.

Thus, by utilizing key rotation, the ledger transaction system 106manages authentication keys more flexibly than conventional systems. Inparticular, the ledger transaction system 106 can generate a newauthentication key for a user account without requiring the user accountto move its contents to a new address. Accordingly, the ledgertransaction system 106 provides for a flexibly security solution toprevent malicious attacks against a user account when the authenticationkey has been leaked keys while allowing for stability with regards tothe user account address. Indeed, by implementing key rotation, theledger transaction system 106 implements configurable keys for useraccounts.

IV. Transactions

A. Overview

As mentioned above, the ledger transaction system 106 can executetransactions across the distributed digital ledger transaction network.Indeed, a user account may submit a transaction, and the ledgertransaction system 106 can utilize validator node devices of thedistributed digital ledger transaction network to execute thetransaction, agree on the transaction results via consensus, and committhe transaction to storage. Indeed, through this process, the ledgertransaction system 106 utilizes transactions to modify the ledger stateof the distributed digital ledger transaction network.

FIG. 22 illustrates a block diagram of submitting a transaction to thedistributed digital ledger transaction network in accordance with one ormore embodiments. As seen in FIG. 22, the ledger transaction system 106can perform an act 2202 of creating a transaction object. Indeed, theledger transaction system 106 can create the transaction object at aclient device associated with the user account submitting thetransaction request.

The transaction request can include several pieces of information. Forexample, the transaction request can include the account addresscorresponding to the user account submitting the transaction request,the transaction script used to executed the requested transaction, thepublic key associated with the user account submitting the transaction,the sequence number associated with the transaction request, a maximumamount of gas the user account is willing to spend in executing thetransaction, the amount of digital assets (e.g., digital currency) theuser account is willing to spend per unit of gas in order to execute therequested transaction. In one or more embodiments, a transaction requestcan include additional information, such as a client-specifiedexpiration for the transaction request.

As further shown in FIG. 22, the ledger transaction system 106 can thenperform an act 2204 of signing the transaction request. In particular,as discussed above, the user account submitting the transaction requestcan sign the transaction request using the private key associated withthe user account. The ledger transaction system 106 can then perform theact 2206 of sending the signed transaction request to a validator nodedevice of the distributed digital ledger transaction network. The ledgertransaction system 106 then utilizes the validator node devices toexecute the transaction request, achieve consensus with regard to theexecution results, and commit the execution results to storage ifconsensus is achieved.

The ledger transaction system 106 can implement many features thatimprove the execution of transactions across the distributed digitalledger transaction network. For example, in one or more embodiments, theledger transaction system 106 can implement more flexible transactionsusing arbitrary transaction scripts. Further, the ledger transactionsystem 106 can utilize smart contracts (i.e., modules and resources) toconfigure the operation of features surrounding transaction execution(such as rejecting invalid transactions, deducting and distributing gasupon transaction execution, or incrementing sequence numbers). Further,the ledger transaction system 106 can utilize access keys that limitaccess to digital assets via transactions.

B. Utilizing Transaction Scripts and Interacting with Modules andResources

As mentioned above, one or more embodiments of the ledger transactionsystem 106 utilize arbitrary transaction scripts to implement flexibletransactions across the distributed digital ledger transaction network.In particular, in one or more embodiments, a transaction script includesan arbitrary program composed using a programming language implementedby the ledger transaction system 106. The program can call out theresources to modify and the module procedures to be used to implementthe modifications. Transaction scripts can be arbitrary in that they caninvoke multiple procedures from various different modules within asingle script. Additionally, transactions scripts can includeconditional logic and can perform local computations. Accordingly, theledger transaction system 106 can utilize transaction scripts toimplement transactions more flexibly than conventional blockchainsystems. Indeed, conventional blockchain systems generally limit thenumber of procedures invoked by a transaction and may only allow simpletransactions that implement basic logic (e.g., transferring an asset).Indeed, by utilizing arbitrary transaction scripts, the ledgertransaction system 106 can implement more complex and expressive one-offacts via the distributed digital ledger transaction network.

Indeed, one or more embodiments of the ledger transaction system 106implement a scheme for allowing transaction scripts to call outresources and module procedures. As mentioned above, the ledgertransaction system 106 can deconstruct smart contracts into resourcesand modules. Accordingly, the ledger transaction system 106 canimplement a set of rules by which arbitrary transaction scripts canutilize module procedures to manipulate (e.g., modify) resources. FIG.23 illustrates a module and a corresponding resource stored at thedistributed digital ledger transaction network in accordance with one ormore embodiments.

For example, FIG. 23 illustrates code of a programming language thatdefines a Currency module 2302. As shown in FIG. 23, the Currency module2302 includes a resource type declaration 2304 of type Coin. Further,the Currency module 2302 defines procedures that a transaction scriptmay call upon in order to user, modify, or otherwise interact with aresource generated based on the Currency module 2302. In particular, theCurrency module 2302 defines a deposit procedure 2306 and a withdrawprocedure 2038 (the code describing the details of these procedures isnot shown in the figure). As shown in FIG. 23, the ledger transactionsystem 106 utilizes the Currency module 2302 to generate the Coinresource 2310.

In one or more embodiments, the Coin resource 2310 is opaque outside ofthe Currency module 2302. Indeed, in some embodiments, the ledgertransaction system 106 limits the use of the Coin resource 2310 toprocedures defined within the Currency module 2302 (and rejectstransactions that seek to use or modify resources outside the proceduresdefined by the module). Specifically, in some embodiments, other modulesand transaction scripts can only read or modify the value fields of theCoin resource 2310 using the public procedures defined within theCurrency module 2302. Similarly, in one or more embodiments, only theprocedures defined within the Currency module 2302 can create or destroyresources of type Coin. In other words, the Currency module 2302provides an application programming interface (API) that has controlover the access, creation, and destruction of the derived resources. Insome embodiments, however, the ledger transaction system 106 defines aset of operations or procedures that can be used to interact with aresource, even though the operations and procedures are not definedwithin the corresponding module.

As an illustration, to execute a transaction that transfers the Coinresource 2310 from a first user account to a second user account, theledger transaction system 106 can generate a transaction script thatcalls upon the withdraw procedure 2308 and the deposit procedure 2306declared in the Currency module 2302. For example, the transactionscript can include a call to the withdraw procedure 2308 (e.g., “letcoin=0x0.Currency.withdraw_from_sender(copy(amount))”) in order towithdraw a value of a specified “amount” from the Coin resource 2310.Further, the transaction script can include a call to the depositprocedure 2306 (e.g., “0x0.Currency.deposit(copy(payee), move(coin))”)to deposit the withdrawn value to the user account specified by “payee.”

C. Utilizing Smart Contracts to Reject Transactions, Deduct GasPayments, Increment Sequence Numbers, and Distribute Gas to ComputerNodes

Conventional blockchain systems perform a variety of tasks inconjunction with executing a transaction. For example, many conventionalsystems implement tasks, such as transaction validation, transaction feewithdrawal, and gas disbursement. Many conventional systems, however,hardcode these tasks. Indeed, many conventional systems define theimplementation of these tasks within their source code. Consequently,this creates inflexibility within the conventional systems asmodification of these tasks requires undesirable modification of thesource code itself.

As mentioned above, one or more embodiments of the ledger transactionsystem 106 perform several transaction execution procedures (e.g.,several acts in executing a transaction). For example, upon receiving atransaction request, the ledger transaction system 106 can perform aseries of checks to determine whether the transaction request is valid.Additionally, as mentioned the ledger transaction system 106 can performa variety of epilogue procedures. As will be discussed below, however,one or more embodiments of the ledger transaction system 106 utilizesmart contracts (i.e., modules and resources) to perform these tasks andmanage modifications or improvements to these tasks over time.

As mentioned previously, as the ledger transaction system 106 receivestransaction requests from client devices, the ledger transaction system106 performs a series of checks before executing the transaction.Specifically, in one or more embodiments, the ledger transaction system106 utilizes the admission control and mempool manager (each discussedabove with regard to FIG. 2) to perform a series of checks on eachreceived transaction. FIG. 24 illustrates a block diagram of the ledgertransaction system 106 performing a series of checks on a receivedtransaction request in accordance with one or more embodiments.

As shown in FIG. 24, the ledger transaction system 106 performs an act2402 of performing initial checks against the transaction request. Inparticular, in some embodiments, the ledger transaction system 106utilizes the admission control to perform the checks. More specificdetail regarding the checks performed are provided above with regard toFIG. 2.

As shown in FIG. 24, the ledger transaction system 106 subsequentlyperforms an act 2404 of performing additional checks based on othertransactions submitted by the same account. Indeed, in one or moreembodiments, the ledger transaction system 106 utilizes a mempoolmanager to perform these additional checks. As mentioned above, theledger transaction system 106 can perform these additional checks beforeadmitting the transaction from the transaction request into the mempoolmanager. More detail regarding these additional checks is provided abovewith regard to FIG. 2.

Additionally, as shown in FIG. 24, the ledger transaction system 106performs an act 2406 of storing the transaction for later execution. Inparticular, if the transaction request satisfies the checks, the ledgertransaction system 106 can store the transaction in the mempool managerfor later execution. In one or more embodiments, however, if thetransaction request fails to satisfy one or more of the checksperformed, the ledger transaction system 106 rejects the transactionrequest. In some embodiments, the ledger transaction system 106 providesa notification of the rejection to the client device that submitted thetransaction request.

In one or more embodiments, the ledger transaction system 106 canutilize a smart contract to manage the above-mentioned checks onreceived transaction requests. In particular, in one or moreembodiments, the ledger transaction system 106 can generate a smartcontract (e.g., a module) for performing checks and rejectingtransactions, the smart contract including a list of procedures that areusable for performing the checks on transaction requests. The ledgertransaction system 106 can then implement the smart contract uponreceiving a transaction request.

In one or more embodiments, the smart contract is configurable (subjectto the public procedures defining the smart contract and consensusprotocols). Indeed, in some embodiments, the ledger transaction system106 can modify or otherwise change the smart contract used forperforming the checks and rejecting transactions via a transactionacross the distributed digital ledger transaction network. For example,in some embodiments, the smart contract itself includes rules orprocedures that are used to modify the smart contract. To illustrate, asmart contract can authorize a subset of validator nodes (e.g.,authorized devices with cryptographic keys) to submit a transaction thatmodifies validation rules for transactions. Thus, the ledger transactionsystem 106 can submit a transaction to change the smart contract to thedistributed digital ledger transaction network (e.g., via a clientdevice or validator node device) and, if consensus is achieved, applythe changes accordingly.

As further mentioned above, upon execution of a transaction, the ledgertransaction system 106 can perform one or more epilogue tasks. FIG. 25illustrates a block diagram of the ledger transaction system 106performing one or more epilogue tasks in accordance with one or moreembodiments. Though FIG. 25 illustrates acts performed in a specifiedorder, it should be noted that these acts can be implemented in anyorder. In one or more embodiments, the ledger transaction system 106performs the epilogue tasks as long as execution advances beyond theprologue tasks (e.g., authenticating the user account sending thetransaction, ensuring the user account sending the transaction hassufficient digital currency to pay for the specified maximum gas, etc.)even if execution fails at subsequent execution steps (e.g., running thetransaction script).

As shown in FIG. 25, the ledger transaction system 106 performs an act2502 of incrementing the user account's sequence number. In particular,the ledger transaction system 106 increments the sequence number of theuser account that sent the transaction request. As discussed above, theledger transaction system 106 utilizes the sequence number of a useraccount as one of many checks to prevent a third-party from sendingfraudulent transaction requests.

Further, as shown in FIG. 25, the ledger transaction system 106 performsan act 2504 of deducting the transaction fee from the user account.Indeed, upon executing a transaction, the ledger transaction system 106can determine a cost of execution. Accordingly, the ledger transactionsystem 106 can deduct the determined amount from the user account thatsent the transaction after the transaction is executed.

In one or more embodiments, the ledger transaction system 106 determinesthe transaction fee based on a gas price and a gas cost. In particular,as mentioned above, each transaction request can specify a price, indigital currency, that the user account submitting the transactionrequest is willing to pay per unit of gas (i.e., the gas price).Further, the ledger transaction system 106 can dynamically account forthe computational power expended in executing the transaction, which istranslated into gas cost. In one or more embodiments, validator nodedevices can prioritize executing transactions with higher gas prices andmay drop transactions with low prices when the distributed digitalledger transaction network is congested.

In some embodiments, the ledger transaction system 106 tracks the numberof gas units used during execution. If the maximum gas limit specifiedin the transaction request is reached before execution completes, theledger transaction system 106 can halt execution immediately. In someembodiments, the ledger transaction system 106 refrains from committingthe partial changes resulting from the execution performed to the ledgerstate, but the transaction still appears in the transaction history andthe ledger transaction system 106 charges the sending user account forthe gas used.

Similar to the transaction checks discussed above, the ledgertransaction system 106 can utilize a smart contract to perform one ormore of the aforementioned post-execution tasks. Indeed, in someembodiments, the ledger transaction system 106 generates a smartcontract (e.g., a module) for performing the post-execution tasks, thesmart contract including one or more procedure calls for performing therequisite tasks. As discussed above, the smart contract for performingthe post-execution tasks can be configurable, allowing for changes orupdates to the implementation of the smart contract.

In addition to using smart contracts to perform checks against atransaction request and performing post-execution tasks, the ledgertransaction system 106 can utilize smart contracts to distributed gaspayments collected from client devices for executing transactions. FIG.26 illustrates a block diagram of the ledger transaction system 106utilizing a smart contract to distribute gas payments in accordance withone or more embodiments.

As shown in FIG. 26, the ledger transaction system 106 performs the act2602 of observing computer node actions on the distributed digitalledger transaction network. As mentioned above, one or more embodimentsof the ledger transaction system 106 utilize a reporting manager thatobserves the computer nodes of the distributed digital ledgertransaction network and reports on any behavior for which rewards shouldbe provided or fees extracted. Examples of such actions that may bereported on are discussed above with reference to FIG. 1. Indeed, theledger transaction system 106 can utilize the reporting manager toobserve actions by validator node devices and by full node devices.

As shown in FIG. 26, the ledger transaction system 106 can furtherperform an act 2604 of sending gas to a smart contract (e.g.,referencing a gas amount in applying the procedures defined by amodule). Indeed, as mentioned above, the ledger transaction system 106can collect gas from a user account that submitted a transaction requestas a transaction fee for executing the transaction. The ledgertransaction system 106 can further generate a smart contract (e.g., amodule) that governs the distribution of this gas among the computernodes of the distributed digital ledger transaction network (e.g., as areward for participating in the network). The ledger transaction system106 can transmit the gas to the smart contract for distribution. In oneor more embodiments, the ledger transaction system 106 can distributedthe gas to the smart contract after executing the transaction script fora set of transactions. In some embodiments, the ledger transactionsystem 106 sends the gas to the smart contract using some other periodictransfer. In one or more embodiments, the ledger transaction system 106can configure, update, or otherwise change the smart contract fordistributing gas as described above.

As shown in FIG. 26, the ledger transaction system 106 can furtherperform an act 2606 of reporting computer node actions to the smartcontract (e.g., referencing the reporting computer node actions inapplying the procedures defined by a module). In particular, the ledgertransaction system 106 can utilize the reporting manager to report theactions taken by the computer nodes on the distributed digital ledgertransaction network. Indeed, in one or more embodiments, the ledgertransaction system 106 configures the smart contract to distribute thegas to the computer nodes based on the actions of those computer nodes(e.g., whether the computer nodes acted appropriately orinappropriately). Thus, the ledger transaction system 106 uses thereporting manager to report the computer node actions so the smartcontract can determine how to distribute the gas. As shown in FIG. 26,the ledger transaction system 106 can then perform an act 2608 ofdistributing the gas to the computer nodes (e.g., distribute to useraccounts corresponding to the computer nodes). Indeed, the ledgertransaction system 106 can utilize the smart contract to distribute thegas based on the reported computer node actions.

By utilizing smart contracts, the ledger transaction system 106 canperform tasks surrounding the execution of a transaction more flexiblythan conventional systems. In particular, as mentioned above, usingsmart contracts allows the ledger transaction system 106 to change howthese tasks are performed more flexibility than conventional systems.Indeed, the ledger transaction system 106 can flexibly modify orotherwise change the smart contracts that performs these tasks withoutneeding to change source code. This allows the distributed digitalledger transaction network to flexibly modify certain transactionfeatures over time to accommodate the needs of the community, addressnew malicious threats as they arise, and scale as the number and type ofdigital transactions grow.

D. Speculative Parallel Execution

Many conventional blockchain systems assemble, at one or more computernodes, transactions that have been submitted for execution intotransaction blocks and then share the assembled transaction blocksacross the network (e.g., to other computer nodes). The conventionalsystems may then execute, at each computer node, the transactions withina particular transaction block and modify the digital ledgeraccordingly.

However, these conventional systems suffer from a variety of problems.For example, conventional blockchain systems are often inflexible inthat they rigidly execute the transactions within a block oftransactions sequentially. Indeed, when executing a given block oftransactions, conventional systems are typically configured to progressthrough the block beginning with the first transaction and executingeach subsequent transaction one at a time. Upon executing a transaction,the conventional systems generate a new state of the network and executethe next transaction based on that new state.

As a result of this rigid approach, conventional blockchain systems arealso inefficient. In particular, because conventional blockchain systemsexecute transactions within a block sequentially, such systems require asignificant amount of time and computing resources (e.g., processingtime) to execute a block of transactions. Indeed, to execute atransaction block conventional systems generally require an amount oftime equal to the collective sum of time needed to execute eachtransaction individually within the block.

One or more embodiments of the ledger transaction system 106 utilizeparallel transaction execution to efficiently execute transactions viathe distributed digital ledger transaction network. For example, in oneor more embodiments, the ledger transaction system 106 determines afirst state data structure (e.g., the most current state) of thedistributed digital ledger transaction network, representing accountstates for the user accounts of the distributed digital ledgertransaction network. The ledger transaction system 106 can then identifya plurality of transactions that include transactions associated with aset of the user accounts. Subsequently, the ledger transaction system106 can perform a preliminary execution of the transactions in parallelrelative to the first state data structure. Through this preliminaryparallel execution, the ledger transaction system 106 can identifyexecution results of applying each transaction to the first state datastructure. The ledger transaction system 106 can also determinedependencies of the transactions with regard to the set of useraccounts. Based on the determined dependencies, the ledger transactionsystem 106 can apply the execution results to generate a second statedata structure (e.g., a second state data structure equivalent toexecuting the plurality of transactions serially against the first statedata structure).

To illustrate, the ledger transaction system 106 can identify a firstset of transactions that are independent of other transactions. Theledger transaction system 106 can apply the transaction results of thesetransactions against the first state data structure to generate anintermediate state data structure. After applying the transactionresults of the first set of independent transactions, the ledgertransaction system 106 can identify a second set of transactions thatare (now) independent. The ledger transaction system 106 can execute thesecond set of transactions against the intermediate data structure. Theledger transaction system 106 can iteratively identify independenttransactions, execute these independent transactions againstintermediate state structures until generating the second state datastructure (that is equivalent to executing the plurality of transactionsserially). In this manner, the ledger transaction system 106 canefficiently and flexibly execute transactions in parallel while stillconsidering dependencies to achieve consistent and accurate state datastructures across the distributed digital ledger transaction network.

As mentioned above, the ledger transaction system 106 can perform apreliminary execution of transactions in parallel to determinetransaction results and dependencies and then apply the transactionresults based on the dependencies. FIG. 27 illustrates a block diagramof the ledger transaction system 106 executing transactions in parallelin accordance with one or more embodiments. In particular, FIG. 27provides an overview of executing a plurality of transactions usingparallel execution in accordance with one or more embodiments.

As shown in FIG. 27, the ledger transaction system 106 can identify aplurality of transactions 2702. FIG. 27 illustrates the plurality oftransactions 2702 including three transactions, though the plurality oftransactions 2702 can include any number of transactions. As mentioned,the plurality of transactions 2702 can include transactions associatedwith a set of user accounts of the distributed digital ledgertransaction network. For example, in one or more embodiments, one ormore of the transactions triggers a write command (e.g., a command tomodify) and/or a read command (e.g., a command to extract data)associated with a user account.

As shown in FIG. 27, the ledger transaction system 106 can perform theact 2704 of performing preliminary execution of the transactions inparallel. In particular, the ledger transaction system 106 can identifya first state data structure of the distributed digital ledgertransaction network (labeled “S₀” in FIG. 27) and perform thepreliminary execution of the transactions relative to the first statedata structure in parallel. In relation to FIG. 27, the first state datastructure includes the most current state data structure of thedistributed digital ledger transaction network, which provides the mostcurrent account states for the user accounts.

As shown, by performing the preliminary execution of the transactions,the ledger transaction system 106 can determine a plurality oftransaction results 2704 a-2704 c relative to the state data structure.The plurality of transaction results 2704 a-2704 c reflect changes toaccounts of the state data structure upon executing each of thetransactions individually. Thus, for example, the transaction results2704 a reflect modifications to one or more user accounts upon executingthe transaction “T₁.”

By executing the transactions preliminarily (i.e., speculatively), theledger transaction system 106 can identify how the transactions areassociated with (e.g., interact with) the set of user accounts. Forexample, the ledger transaction system 106 can identify whether atransaction reads from and/or writes to a particular user account fromthe set of user accounts. Additionally, by executing the transactionspreliminarily, the ledger transaction system 106 can determine whetherthe transaction has a valid signature, can pay the required transactionfee, and will not otherwise modify the distributed digital ledgertransaction network.

As shown in FIG. 27, based on the preliminary execution, the ledgertransaction system 106 can perform the act 2706 of determiningdependencies between the transactions from the plurality of transactions2702. Specifically, for a given transaction, the ledger transactionsystem 106 can determine whether that a transaction depends on apreceding transaction. To illustrate, the ledger transaction system 106can determine that a given transaction depends on a precedingtransaction when the given transaction reads from the same user accountto which the preceding transaction writes (e.g., the precedingtransaction withdraws digital assets from a user account and the giventransaction reads the current value of the digital assets associatedwith the user account). As another example, the ledger transactionsystem 106 can determine that a given transaction does not depend on apreceding transaction when both transactions read from the same useraccount.

To illustrate, consider the following three transactions:

T₁: Send 1 coin from A to B [reads A, B; writes A, B]T₂ Send 1 coin from X to Y [reads X, Y; writes X, Y]T₃: If A's balance is less than 50, send 1 coin from C to D [reads A, C,D; writes C, D]

Based on performing a preliminary execution, the ledger transactionsystem 106 can determine that T₁ reads and writes to both accounts A andB (e.g., the transactions access A to determine digital assets, withdrawdigital assets, accessing B, and deposit digital assets to B).Similarly, the ledger transaction system 106 can determine that T₂ readsand writes to both accounts X and Y. Further, the ledger transactionsystem 106 can determine that T₃ reads from A (i.e., accesses A todetermine if the balance is less than 50) reads from C and D and writesto C and D. Accordingly, the ledger transaction system 106 determinesthat T₃ depends from T₁ (while T₁ and T₂ are independent of othertransactions).

In one or more embodiments, the ledger transaction system 106 canfurther identify whether one or more transactions within the pluralityof transactions 2702 will fail upon execution. To illustrate, the ledgertransaction system 106 can determine that a transaction will fail uponif execution of the transaction triggers a withdrawal of digital assetsfrom a user account and the value of the digital assets associated withthat user account will be insufficient at the time of execution. In oneor more embodiments, the ledger transaction system 106 rejectstransactions that will fail upon execution.

As illustrated by FIG. 27, the ledger transaction system 106subsequently performs the act 2708 of applying transaction results basedon the dependencies. In particular, the ledger transaction system 106can apply the transaction results 2704 a-2704 c based on thedependencies determines from performing the preliminary execution.Specifically, based on determining that the transactions T₁ and T₂ donot depend on each other (e.g., are independent), the ledger transactionsystem 106 applies the transaction results 2704 a and 2704 b to thestate data structure, S₀, to generate an intermediate state datastructure S_(A). The intermediate state data structure S_(A) thusreflects changes to accounts resulting from T₁ and T₂.

As shown in FIG. 27, the ledger transaction system 106 determines thatthe transaction T₃ depends on the transaction T₁. Upon determining thatthe ledger transaction system 106 has applied the transaction result forT₁, the ledger transaction system 106 can determine that the transactionT₃ is no longer dependent on a pending transaction. Accordingly, theledger transaction system 106 executes the transaction T₃ relative tothe intermediate data structure S_(A). In relation to FIG. 27, theledger transaction system 106 does not directly apply the transactionresult 2704 c because the transaction result 2704 c is relative to thestate data structure S₀ (which does not reflect the modifications fromT₁ upon which T₃ depends).

As shown, upon executing the final transaction(s) from the plurality oftransactions 2702, the ledger transaction system 106 can generate asecond state data structure (“S₁”) that includes modified account statesthat reflect the results of the transactions. In particular, the secondstate data structure includes the same state data structure that wouldhave been reached had the ledger transaction system 106 executed eachtransaction within the plurality of transactions 2702 serially.

The ledger transaction system 106 can apply transaction results andexecute dependent transactions to intermediate data structures in avariety of orders. For example, although FIG. 27 illustrates applying T₁and T₂ against the first state data structure S₀, the ledger transactionsystem 106 can utilize a different order. To illustrate, the ledgertransaction system 106 can apply T₁ against the first state datastructure S0 to generate an intermediate state data structure S_(A). Theledger transaction system 106 can then execute T₃ against S_(A) togenerate a second intermediate data structure S_(B). The ledgertransaction system 106 can then execute T₂ against S_(B) to generate thesecond state data structure S₁. For instance, the ledger transactionsystem 106 can utilize this approach where there is some indication thatthe order of executing the transactions is important. For example, avalidator node can provide an indication to execute transactions in aparticular order.

In some embodiments, the ledger transaction system 106 performs the act2706 of determining dependencies based on a dependency indicator. Forexample, a validator node can receive a dependency indicator fromanother validator node (e.g., a leader node for consensus) indicatingone or more dependencies between the plurality of transactions. In someembodiments, the ledger transaction system 106 can use the dependencyindicator in performing the preliminary execution and/or applyingtransaction results.

To illustrate, in some embodiments, the ledger transaction system 106receives a dependency indicator that T3 depends from T1. In response,the ledger transaction system 106 can exclude T3 from the act 2704.Specifically, the ledger transaction system 106 can perform preliminaryexecution for T1 and T2 in parallel (without performing preliminaryexecution on T3). The ledger transaction system 106 can apply thetransaction results 2704 a, 2704 b to generate the intermediate statedata structure SA, and then execute T3 against the intermediate statedata structure SA.

Thus, the ledger transaction system 106 can utilize the dependencyindicator to determine a first subset of transactions (e.g.,intermediate transactions) and a second subset of transactions (e.g.,dependent transactions). The ledger transaction system 106 can performpreliminary parallel execution of the first subset of transactionsrelative to the first state data structure, and then execute the secondsubset of transactions against intermediate data structures.

In some embodiments, even upon receiving a dependency indicator, theledger transaction system 106 can still perform a preliminary executionacross all transactions to determine whether the dependency indicator isaccurate. For instance, if a computer node determines that a dependencyindicator is inaccurate, the ledger transaction system 106 can disregardthe dependency indicator. Moreover, the ledger transaction system 106can penalize the computer node that distributed the inaccuratedependency indicator (or refuse to vote for the block).

In one or more embodiments, the ledger transaction system 106 storesdata structure the second state data structure in temporary storage anddelays modifying the first state data structure in storage untilconsensus is achieved. To illustrate, though not shown in the figures,the ledger transaction system 106 can receive an indication of consensusamong computer nodes of the distributed digital ledger transactionnetwork with respect to the second state data structure (“S₁.”). In oneor more embodiments, receiving the indication of consensus includesreceiving, at the lead validator node, the requisite votes to finalizethe plurality of transactions 2702. In some embodiments, receiving theindication of consensus includes receiving, at another (i.e., non-lead)validator node, an indication that the plurality of transactions 2702has been finalized (e.g., from the lead validator node). As discussedabove, consensus with respect to the second state data structure caninclude consensus with respect to the root value of the transactiontree—which includes a representation of the second state datastructure—as modified by the plurality of transactions 2702.

In response to receiving the indication of consensus, the ledgertransaction system 106 can commit the second state data structure tostorage. For example, the ledger transaction system 106, at eachcomputer node of the distributed digital ledger transaction network, canmodify the data structures (e.g., the first state data structure) storedat the respective computer node based on the second state datastructure. In particular, the ledger transaction system 106 can modifythe data structures based on the plurality of transactions 2702 asvalidated via consensus.

As mentioned above, the ledger transaction system 106 can determine thedependencies among transactions within a plurality of transactions andthen apply transaction results based on those dependencies. FIG. 28illustrates a block diagram of the ledger transaction system 106determining dependencies and applying transaction results based on thedependencies in accordance with one or more embodiments.

For example, as shown in FIG. 28, the ledger transaction system 106 canperform the act 2802 of generating an address dependency graph. Inparticular, the ledger transaction system 106 can perform a preliminaryexecution of the transactions in parallel (as discussed above) and thendetermine the dependencies of those transactions based on thepreliminary execution. The ledger transaction system 106 can thengenerate the address dependency graph. As shown in FIG. 28, the addressdependency graph shows each transaction from the plurality oftransactions that is associated with a particular user account of thedistributed digital ledger transaction network.

As further shown in FIG. 28, the ledger transaction system 106 ordersthe transactions associated with each user account within the dependencygraph. In one or more embodiments, the ledger transaction system 106orders the transactions associated with each user account based on timeof submission. In some embodiments, the ledger transaction system 106orders the transactions based on one or more other factors.

As illustrated by FIG. 28, the ledger transaction system 106subsequently performs the act 2804 of generating forward and backwarddependency graphs. In particular, the ledger transaction system 106utilizes the address dependency graph to generate the forward andbackward dependency graphs. For example, the forward dependency graphshows, for a given transaction, the transactions that are directlydependent upon execution of that transaction (i.e., the transactionsthat immediately follow that transaction) as shown by the addressdependency graph. To illustrate, the forward dependency graphillustrated in FIG. 28 shows that both tx2 and tx3 are directlydependent upon the execution of tx1. In other words, tx1 is associatedwith at least one user account that is also associated with tx2 and tx3,but tx1 is ordered to immediately precede both tx2 and tx3 as shown bythe address dependency graph.

The backward dependency graph shows, for a given transaction, thetransactions upon which that transaction directly depends as shown bythe address dependency graph. To illustrate, the backward dependencygraph illustrated in FIG. 28 shows that tx2 is directly dependent upontx1. In other words, tx2 is associated with at least one user accountthat is also associated with tx1 but tx2 is ordered to immediatelyfollow tx1 as shown by the address dependency graph.

As shown by FIG. 28, the ledger transaction system 106 can then performthe act 2806 of applying transaction results without a backwarddependency. In particular, in one or more embodiments, the ledgertransaction system 106 applies transaction results determined form thepreliminary parallel execution if the backward dependency graph showsthat the backward dependency slot for that transaction is empty. Forexample, as shown in FIG. 28, the ledger transaction system 106 canapply the transaction results for tx1 as the backward dependency slotfor tx1 is empty in the backward dependency graph.

As shown in FIG. 28, the ledger transaction system 106 can furtherperform the act 2808 of broadcasting the execution to the forwarddependent transactions. In one or more embodiments, in response to thebroadcast, the ledger transaction system 106 removes the transactionfrom the backward dependency graph. The ledger transaction system 106can then determine which transactions no longer have a backwarddependency and can execute those transactions accordingly (e.g., executethose transactions relative to an intermediate state data structure).Thus, the ledger transaction system 106 can iteratively executetransactions, broadcast their execution, and then identify transactionsthat are newly available for execution until all of the transactionshave been executed.

In one or more embodiments, the ledger transaction system 106 includesone or more execution managers that each manage execution of one or moreof the transactions. The execution manager associated with a giventransaction can additionally manage a forward dependency graph and abackward dependency graph specific to that transaction. The executionmanager can determine if the transaction has a backward dependency and,if not, can execute the transaction. If a backward dependency exists,the execution manager can wait to execute the transaction until afterreceiving a broadcast indicating that the transactions upon which thegiven transaction is forwardly dependent have been executed. Once thebroadcast is received, the execution manager can remove the executedtransaction from the backward dependency graph (if applicable). Upondetermining that the transaction no longer has backward dependencies,the execution manager can execute the transaction. Upon executing atransaction, the associated execution manager can broadcast anindication of the execution to the other execution managers. In one ormore embodiments, upon determining that a transaction will fail, theassociated execution manager can still send a broadcast to the otherexecution managers for removal of the transaction from the associatedbackward dependency graphs.

In this manner, the ledger transaction system 106 provides moreflexibility with respect to transaction execution when compared toconventional systems. In particular, the ledger transaction system 106can flexibly execute and apply transaction results while still achievingthe same resulting state data structure based on dependencies amongstthe transactions. Additionally, the ledger transaction system 106operates more efficiently than conventional systems. Indeed, byexecuting transactions in parallel, the ledger transaction system 106reduces the amount of time required to execute a plurality oftransactions.

E. Custody/Rate Limited Keys

Conventional blockchain systems often restrict access to the digitalassets of a user account to the owner of the user account. However, suchconventional systems generally provide the owner of a user account withunrestricted access to the digital assets stored therein. This generallyposes a security risk as a malicious third party that have obtainedaccess to a user account (e.g., by obtaining the private key associatedwith that user account) will have unhampered access to the account andcorresponding digital assets.

One or more embodiments of the ledger transaction system 106 utilizeaccess limits (e.g., a threshold number of keys from a group of keys oraccess limited keys) to provide security protection to digital assetsstored at user accounts. For example, in one or more embodiments, theledger transaction system 106 restricts access to the digital assetsstored at a user account by generating one or more threshold accessrequirements (e.g., a threshold number of access keys required to accessthe account). When a transaction is submitted to utilize the digitalassets of the user account, the ledger transaction system 106 candetermine whether the threshold access requirements have been satisfiedand provide access to the digital assets based on that determination.

In some embodiments, the ledger transaction system 106 can utilizeaccess key limits that restrict how the digital assets of a user accountmay be used. In particular, the ledger transaction system 106 can useaccess keys with value key limits (i.e., limits on the value of digitalassets that can be accessed via the access keys) and/or rate key limits(i.e., limits on the rate at with digital assets can be used via theaccess key). In this manner, the ledger transaction system 106 canprotect the digital assets of a user account from unwanted access.Further, if such access if achieved, the ledger transaction system 106can minimize the loss of digital assets achieved by the unwanted access.

In addition to improving security, the ledger transaction system 106 canalso improve flexibility. For example, the ledger transaction system 106can generate a variety of different access key limits for differentaccess keys, such that a user account can user a first access keysubject to a first access key limit and a second access key subject to asecond access key limit. In this manner, the ledger transaction system106 can provide protection for each individual access key, whileallowing for flexible use of different access keys for differentpurposes (e.g., allow an untrusted agent to a use a first access keywith a low value key limit and allow a trusted agent to use a secondaccess key with a higher value key limit).

FIG. 29 illustrates the ledger transaction system 106 implementingaccess limits on digital assets stored at a user account in accordancewith one or more embodiments. As shown in FIG. 29, the ledgertransaction system 106 can associate access requirements 2906 with auser account 2902. The access requirements 2906 restrict access todigital assets04 2904 stored at the user account 2902. When atransaction request 2912 that attempts to access (e.g., transfer) thedigital asset 2904 is received, the ledger transaction system 106 canallow access depending on whether or not the access requirements 2906have been met.

For example, the access requirements 2906 can include a threshold numberof access keys (where threshold “number” includes a number, percentage,or ratio). For example, the access requirements 2906 can require that aminimum number of users from a group of users 2908 associated with theuser account 2902 are associated with the transaction request 2912 toaccess the digital asset 2904. For example, each of the users canprovide a digital signature associated with that user with thetransaction request 2912. In one or more embodiments, the minimum numberof users required by the ledger transaction system 106 includes allusers from the group of users 2908. In some embodiments, the minimumnumber of users includes only a subset of users from the group of users2908.

Additionally, the access requirements 2906 can require that a thresholdnumber (i.e., a number, percentage, or ratio) of access keys from agroup of access keys 2910 associated with the user account 2902 areassociated with the transaction request 2912 to access the digital asset2904. Indeed, the ledger transaction system 106 can generate one or moreaccess keys to be used in accessing the digital asset 2904. In one ormore embodiments, the minimum number of access keys required by theledger transaction system 106 includes all access keys from the group ofaccess keys 2910 associated with the user account 2902. In someembodiments, the minimum number of access keys includes only a subset ofaccess keys from the group of access keys 2910. In one or moreembodiments, the ledger transaction system 106 requires both a minimumnumber of users from the group of users 2908 and a minimum number ofaccess keys from the group of access keys 2910 to be associated with thetransaction request 2912 to access the digital asset 2904.

As mentioned, upon receiving the transaction request 2912 to access thedigital asset 2904, the ledger transaction system 106 can determinewhether the access requirements 2906 are satisfied. In one or moreembodiments, if the access requirements 2906 are not satisfied, theledger transaction system 106 can reject the transaction request 2912.However, if the access requirements 2906 are satisfied, the ledgertransaction system 106 can accept the transaction request 2912 (andexecute the corresponding transaction).

As mentioned above and as further showed in FIG. 29, the ledgertransaction system 106 can utilize access key limits 2920 (e.g., valuekey limits and/or rate key limits) to restrict access to the digitalasset 2904 stored at the user account 2902. In particular, the accesskey limits 2920 can restrict the degree of access provided to particularaccess keys (e.g., the access key 2922). To illustrate, in one or moreembodiments, the access key limits 2920 limits the total amount or totalvalue of the digital asset 2904 that can be accessed using the accesskey 2922 (e.g., value key limits that provide a maximum currency valueof the digital asset 2904 that may be accessed using the access key2922). In some embodiments, the access key limits 2920 provides a limiton a time period for which the access key is 2922 can successfullyaccess the digital asset 2904 (e.g., the access key 2922 is rate limitedkey valid only for a day, a week, a month, etc.). In some embodiments,the access key limits 2920 limits the rate of total amount or totalvalue of the digital asset 2904 that can be accessed by the access key2922 within a recurring period of time (e.g., a rate key limit thatdefines a maximum currency value that can be accessed each day, eachweek, each month, etc.). In one or more embodiments, the ledgertransaction system 106 can combine one or more of the aforementionedlimits in a variety of ways (e.g., providing a currency value that canbe accessed using the access key 2922 each week and further limiting thevalidity of the access key 2922 to a year).

In one or more embodiments, the ledger transaction system 106 cangenerate access keys based on other access keys. For example, the ledgertransaction system 106 can generate one or more access keys (i.e., “subaccess keys”) based on the access key 2922 (i.e., a “parent accesskey”). Accordingly, the ledger transaction system 106 can generateaccess key limits corresponding to the sub access keys. In one or moreembodiments, the access key limits corresponding to a sub access key aremore limiting than the access key limits 2920 associated with the parentaccess key 2922. To illustrate, if the access key limits 2920 limitedthe total amount or value of the digital asset 2904 available to theparent access key 2922, the ledger transaction system could generate aset of sub access keys, each having access limited to a subset of thetotal amount or value accessible to the parent access key 2922.

Upon receiving a transaction request 2924 to access the digital asset2904 using the access key 2922, the ledger transaction system 106 candetermine whether the access key limits 2920 associated with the accesskey 2922 have been met. Indeed, the ledger transaction system 106 cantrack the activity of the access key 2922 to determine when the accesskey has reached the limit of its accessibility. In some embodiments,upon determining that the access key limits 2920 have been met, theledger transaction system 106 can reject the transaction request 2924.

In one or more embodiments, the ledger transaction system utilizes asmart contract (i.e., a module) to handle transactions requestssubjected to access limits. Indeed, in some embodiments, ledgertransaction system 106 can generate a smart contract that defines theaccess limits (i.e., the access requirements and/or access key limits)associated with a user account. Upon receiving a transaction requestsubject to the access limits, the ledger transaction system 106 can usethe smart contract to determine whether to accept or reject thetransaction request. For example, the ledger transaction system 106 canutilize a smart contract to track the access of digital assets of a useraccount by a particular access key. When a transaction request that usesthe access key is received, the ledger transaction system 106 can thenuse the smart contract to determine whether or not the access key limitsfor that access key have already been met.

Thus, by utilizing access limits, the ledger transaction system 106provides additional security and flexibility relative to conventionalsystems. For example, by implementing access requirements with respectto digital assets, the ledger transaction system 106 prevents unwantedaccess to those digital assets. Additionally, by providing access keylimits, the ledger transaction system 106 mitigates potential maliciousaccess of digital assets upon a third party obtaining one or more accesskeys. Moreover, by allowing users to define a variety of differentcombinations of access limits (e.g., a threshold number of keys, ratelimited keys, and/or value limited keys), the ledger transaction system106 allows users accounts to flexibly allow different degrees of access(e.g., to different agents or for different purposes).

F. Transaction Events

Many conventional systems maintain one or more data repositories thatstore transactions for individual transactions (e.g., who receivedassets, who transmitted assets, the values of the assets exchanged,etc.). Upon execution of a transaction, the conventional systems maygenerate new entries for one or more of these data repositories to storethe details of that transaction. The conventional systems may furtheruser these data repositories to locate and provide transaction details.

However, conventional blockchain systems are often inefficient andinaccurate in tracking and reporting transaction details. For example,conventional blockchain systems often employ inefficient methods ofproviding transaction details in response to a query. To illustrate, inresponse to receiving a query from a client device for detailsassociated with a particular transaction, many conventional systemsprovide header (e.g., summary) data for every block of transactions thathas been executed. Subsequently, the conventional systems may providetransaction receipts for every transaction within a block identified bythe client device as potentially containing the particular transaction.The conventional systems may then provide a list of log entries for atransaction identified from the transaction receipts by the clientdevice as potentially containing the desired details. Accordingly, theconventional systems often utilize a significant amount of computingresources (e.g., processing time and power) to locate and transmit datathat does not satisfy the query.

In addition to efficiency concerns, conventional blockchain systems areoften inaccurate. In particular, many conventional systems utilize bloomfilters to store and provide transaction details. Such bloom filtersrisk generating false positives when determining whether desiredtransaction details are included within the data stored therein.Accordingly, the conventional systems may inaccurately respond to aquery for transaction details by providing data that is unrelated to thequery. In addition, even though conventional systems can search forhistorical transactions, they do not provide negative proofs toestablish the lack of transactions. For example, conventional systemscannot conclusively prove the absence of a transaction touching aparticular count. This is a significant shortcoming inasmuch as manyaccount holders within a distributed digital ledger transaction networkoften seek verification that no events have occurred with regard todigital assets within their accounts.

One or more embodiments of the ledger transaction system 106 utilizetransaction events and an event data structure to accurately andefficiently provide transaction event details, including negative proofsestablishing that events have not touched user accounts. As mentionedabove, the ledger transaction system 106 can generate an event datastructure that stores event data corresponding to transaction events.Upon execution of a transaction associated with a user account, theledger transaction system 106 can generate one or more transactionevents within the event data structure. Additionally, the ledgertransaction system 106 can modify a count value of a transaction eventcounter corresponding to the user account. In one or more embodiments,the ledger transaction system 106 maintains a plurality of transactionevent counters corresponding to a user account, where each transactionevent counter tracks a count value for a particular class of transactionevent. The ledger transaction system 106 can utilize the count values ofthe transaction event counter to provide transaction event datacorresponding to transaction events specified in a request. In thismanner, the ledger transaction system 106 can accurately and efficientlymanage queries for transaction event data.

For example, consider, E_(i), as the list of events emitted during theexecution of T_(i), (stored in an event Merkle tree as described inrelation to FIG. 4). In some embodiments, the leaves of this eventMerkle tree are tuples of the form (access path; data payload; countervalue)_(j). These tuples can be indexed by the order j in which theevents were emitted. The authenticator for E_(i) is included inTransactionInfo_(i) (e.g., a transaction data structure). Thus, avalidator can construct proofs that within the ith transaction the jthevent was emitted on access path A, had counter value c, and had datapayload p.

Clients can make use of these proofs to access events on a given accesspath. For example, suppose a client wants to know all events that haveever been emitted on access path A. The client holds a recent quorumcertificate at version i. Using S_(i), the client can make anauthenticated query for c, the counter value of A at version i. For j∈0. . . c the client can make an authenticated query for the event tupleemitted on A with counter j. The client can determine that there isexactly one such event since transaction execution generates events withsequential counter numbers. Therefore, proof that there exists somehistorical event emitted on A with counter j is sufficient as a proofthat that event is the only such event.

This approach allows the client to hold an authenticated subscription toevents on access path A. The client can periodically poll to determineif the subscription is up-to-date. For example, a client can use this tomaintain a subscription to incoming payment transactions on an addressit is watching.

At first glance, events might seem redundant. Instead of querying forthe events emitted by a transaction T_(i), a client could ask whetherthe transaction T_(i) has been included in the digital ledger. However,this approach is error-prone because the inclusion of T_(i) does notimply successful execution (e.g., it might have run out of gas). In asystem where transactions can fail, an event provides evidence not onlythat a particular transaction has executed but also that it hassuccessfully completed with the intended effect.

As just mentioned, upon execution of a transaction, the ledgertransaction system 106 can generate one or more transaction events.FIGS. 30A-30B illustrate a block diagram of the ledger transactionsystem 106 generating transaction events associated with a user accountin accordance with one or more embodiments. In particular, FIG. 30Aillustrates a transaction 3002 (moving “10 coins to User A's Accountfrom User X's Account”) and FIG. 30B illustrates a transaction 3020(moving “20 coins from User A's Account to User Z's Account”). ThoughFIGS. 30A-30B illustrate the ledger transaction system 106 generatingtransaction events fort particular transaction types (e.g., receiving orsending currency), it should be noted that the ledger transaction system106 can generate transaction events for any class of transaction (e.g.,execution of a variety of smart contracts).

As shown in FIG. 30A, the ledger transaction system 106 (e.g., operatingon a validator node device 3004) receives or otherwise identifies atransaction 3002 (e.g., within a block of transactions). For purposes ofillustration, the transaction 3002 includes a transfer of coins to aparticular user account. The ledger transaction system 106 executes thetransaction 3002.

In response to execution of the transaction 3002, the ledger transactionsystem 106 generates the transaction event 3006. As shown in FIG. 30A,the transaction event 3006 includes event data 3008. As mentioned above,in one or more embodiments, the event data 3008 includes the address,within the state data structure, of the user account associated with thetransaction event. In particular, the ledger transaction system 106 caninclude the address of the user account as part of an access path usedto access the transaction event counter corresponding to the transactionevent. To illustrate, the access path “/0x12345/events/ReceivedFrom”includes the address of the user account (i.e., “0x12345”) and thetransaction event counter to be accessed within the account (i.e.,“events/ReceivedFrom”).

The event data 3008 can further include the count value of thetransaction event counter of the user account after the transactionevent (also referred to as the “sequence number”) and details of thetransaction event. Examples of transaction event details can include,but are not limited to, the parties involved in the particulartransaction event and the value represented by the transaction event(e.g., the value of the digital assets transferred via the transaction3002). In one or more embodiments, the event data 3008 further includesthe height of the transaction 3002 within the transaction tree.

In one or more embodiments, the ledger transaction system 106 generatesthe transaction event 3006 within an event data structure (e.g., asdescribed above in relation to FIG. 4). In particular, the ledgertransaction system 106 can add the event data 3008 to the event database3012. Further, the ledger transaction system 106 can add the event data3008 to an event tree 3010 (e.g., an event Merkle tree) corresponding tothe transaction 3002. In particular, the ledger transaction system 106can generate the event tree 3010 to reflect all transaction eventscorresponding to the transaction 3002. Specifically, in one or moreembodiments, the ledger transaction system 106 adds a leaf node to theevent tree 3010 for each transaction event corresponding to thetransaction 3002.

In one or more embodiments, the ledger transaction system 106 adds theevent data 3008 to the event tree 3010 by storing, within the leaf nodecorresponding to the transaction event 3006, a hash value correspondingto the event data 3008. For example, the ledger transaction system 106can apply a hash function to the transaction event details of the eventdata 3008 and store the resulting hash value within the leaf nodecorresponding to the transaction event 3006. In some embodiments, theledger transaction system 106 applies the hash function to the eventdata 3008 in its entirety and stores the resulting hash value within theleaf node.

In one or more embodiments, after generating the event tree 3010corresponding to the transaction 3020, the ledger transaction system 106determines the root value of the event tree 3010. As described above,the ledger transaction system 106 can determine the root value byiteratively combining and hashing node values beginning at the bottom ofthe event tree 3010 and moving upwards. The ledger transaction system106 can then store the root value of the event tree 3010 within thetransaction tree of the distributed digital ledger transaction network(e.g., as described above in relation to FIG. 5).

As shown in FIG. 30A, the ledger transaction system 106 further modifiesa count value of the transaction event counter 3016 of the user account3014 in response to (as part of) execution of the transaction 3002. Inparticular, the ledger transaction system 106 can access the transactionevent counter 3016 via the state data structure using the access paththat includes the address of the user account 3014. The ledgertransaction system 106 can then modify the count value of thetransaction event counter 3016 by incrementing the count value.

In one or more embodiments, the ledger transaction system 106 canprovide the count value of the transaction event counter 3016 uponrequest. For example, the ledger transaction system 106 (via a validatornode or full node) can receive an event count request (e.g., from one ofthe client devices 112 a-112 n or from one of the computer nodes 108a-108 d). The event count request can include an access path, whichincludes the address of the user account 3014 and the transaction eventcounter 3016. In response to receiving the event count request, theledger transaction system 106 can provide the count value of thetransaction event counter.

Because of the different data structures utilized by the ledgertransaction system 106, the ledger transaction system 106 can verify theexistence of events (or a lack of events) based on the count values ofan event counter. Indeed, as mentioned above (e.g., in relation to FIGS.3-6), the ledger transaction system 106 can store event counters andcorresponding count values within a state data structure (e.g., a statedatabase and corresponding state Merkle tree). Moreover, the ledgertransaction system 106 can determine a root of the state Merkle tree,utilize the root of the state Merkle tree in generating a transactionMerkle tree, and utilize a root of the transaction Merkle tree to getconsensus on the digital ledger. Accordingly, the count values of eventcounters are verified as part of consensus across the distributeddigital ledger transaction network. Thus, the event counters can providean accurate proof of the events (or a lack of events) for an account.

In some embodiments, the ledger transaction system 106 can provide eventdetails of the transaction event 3006 from the event data structure uponrequest. For example, the ledger transaction system 106 can receive atransaction event detail request (e.g., from one of the client devices112 a-112 n or from one of the computer nodes 108 a-108 d). Thetransaction event detail request can include the count value of thetransaction event counter and the access path used to access thetransaction event counter. In response to receiving the transactionevent detail request, the ledger transaction system 106 can provide theevent data 3008 of the transaction event 3006 (e.g., the event detailsof the transaction event) from the event data structure. In one or moreembodiments, the ledger transaction system 106 further provides a Merkleproof corresponding to the transaction event 3006 along with the eventdata 3008.

In one or more embodiments, the ledger transaction system 106 canprovide a set of transaction event data corresponding to a sequence ofevents. For example, the ledger transaction system 106 can receive atransaction event sequence request for details regarding a sequence oftransaction events corresponding to a user account. The transactionevent sequence request can include the access path to the transactionevent counter as well as a sequence of count values. The sequence ofcount values can correspond to a sequence of events corresponding to auser account. In response to receiving the transaction event sequencerequest, the ledger transaction system 106 can provide a set oftransaction event data corresponding to the sequence of events.

To provide an example of providing transaction event data in response toa request, in one or more embodiments, the event data structure caninclude a transaction event index database. The transaction event indexdatabase can include a mapping between each transaction event tracked bya particular transaction event counter and the location of thetransaction event data corresponding to the transaction events withinthe event data structure. In particular, the transaction event indexdatabase can map each transaction event to the particular transactionthat triggered the transaction. Further, the transaction event indexdatabase can indicate the event number corresponding to that transactionevent out of all transaction events triggered by that transaction.

In one or more embodiments, the transaction event detail request (ortransaction event sequence request) can include an access path for thetransaction event counter corresponding to the target transaction eventas well as the sequence number corresponding to the transaction event.The ledger transaction system 106 can utilize the transaction eventindex data to identify the location of the transaction event data basedon the access path of the transaction event counter and the sequencenumber of the transaction event. The ledger transaction system 106 cansubsequently retrieve and provide the transaction event data from theevent data structure.

As illustrated by FIG. 30B, the state data structure can includemultiple transaction event counters for the user account 3014. Forexample, each of the transaction event counters 3016, 3018 correspond toa particular transaction event type. For example, the transaction eventcounter 3016 corresponds to a first transaction event type (e.g., theuser account 3014 receiving digital assets). Moreover, the transactionevent counter 3018 corresponds to a second transaction event type (theuser account 3014 transmitting digital assets). In response to executinga transaction that generates a transaction event, the ledger transactionsystem 106 can determine the transaction event type of the transactionevent. The ledger transaction system can then modify the count value ofthe transaction event counter that corresponds to that transaction eventtype. Thus, the ledger transaction system 106 can maintain an accuratecount of each class of transaction event that is associated with aparticular user account.

Though FIGS. 30A-30B illustrate two transaction event counterscorresponding to the user account 3014, the state data structure caninclude any number of transaction event counters corresponding to a useraccount. And the transaction event counters can correspond to a varietyof transaction event types (e.g., different counters for different smartcontracts). However, in some embodiments, the state data structureincludes a single transaction event counter corresponding to a useraccount, and the ledger transaction system 106 increments thecorresponding count value upon the generation of any transaction eventtype.

As the ledger transaction system 106 continues to execute transactions,the ledger transaction system 106 can generate transaction events andmodify count values of the corresponding transaction event counters. Forexample, as shown in FIG. 30B, the ledger transaction system 106 (e.g.,operating either on the validator node device 3004 or on anothercomputer node of the distributed digital ledger transaction network)receives or otherwise identifies the transaction 3020. The transaction3020 can be included in the same block of transactions or a differentblock of transactions as the transaction 3002. For purposes ofillustration, the transaction 3020 includes a transfer of coins from auser account (i.e., the user account 3014). The ledger transactionsystem 106 executes the transaction 3020.

In response to execution of the transaction 3020, the ledger transactionsystem 106 generates the transaction event 3022. As mentioned above, insome embodiments, the ledger transaction system 106 generates thetransaction event 3022 within the event data structure. In particular,the ledger transaction system 106 can add the event data 3024 of thetransaction event 3022 to the event database 3012. Further, the ledgertransaction system 106 can add the event data 3024 to an event tree 3026(e.g., an event Merkle tree). As the transaction event 3022 correspondsto a different transaction (i.e., different from the transaction event3006), the ledger transaction system 106 adds the event data 3024 to adifferent event tree (i.e., different from the event tree 3010). Theledger transaction system 106 generates the event tree 3026 based ontransaction events corresponding to the transaction 3020 and stores datawithin the leaf nodes corresponding to those transaction events. Asmentioned above, the ledger transaction system 106 can add the eventdata 3024 to the event tree 3026 by storing, within the leaf nodecorresponding to the transaction event 3022, a hash value correspondingto the event data 3024. The ledger transaction system 106 can store theroot value of the event tree 3026 within the transaction tree of thedistributed digital ledger transaction network.

In response to execution of the transaction 3020, the ledger transactionsystem 106 further modifies the count value of the transaction eventcounter 3018 of the user account 3014. In particular, the ledgertransaction system 106 accesses the transaction event counter 3018 viathe state data structure using the corresponding access path. The ledgertransaction system 106 then increments the count value of thetransaction event counter 3018.

As mentioned above, the ledger transaction system 106 can manage queriesfor transaction event data. As further mentioned, the ledger transactionsystem 106 can be implemented in whole, or in part, by any of theindividual elements of distributed digital ledger transaction network.For example, while much of the disclosure discusses the ledgertransaction system 106 as implemented on one of the computer nodes 108a-108 d of the distributed digital ledger transaction network, theledger transaction system 106 can also be implemented on one or more ofthe client devices 112 a-112 n (e.g., as part of the client device). Assuch, in one or more embodiments, the ledger transaction system 106 (orone or more components thereof) implemented on a client device candetect the occurrence of new transaction events and generate requestsfor transaction event data corresponding to those transaction events.FIGS. 31-32 illustrates the ledger transaction system 106 monitoringtransaction event updates and retrieving transaction event data inaccordance with one or more embodiments.

FIG. 31 shows an example of a series of acts 3100 for determining theoccurrence of new transaction events corresponding to a user account inaccordance with one or more embodiments. Though FIG. 31 shows the ledgertransaction system 106 performing one or more acts from the series ofacts 3100 by communicating with a full node device, it should be notedthat the ledger transaction system 106 can perform the one or more actsby communicating with any computer node of the distributed digitalledger transaction network. Further, though, FIG. 31 shows the ledgertransaction system 106 performing the series of acts 3100 at a clientdevice, the ledger transaction system 106 can also perform the series ofacts 3100 at another device of the distributed digital ledgertransaction network (e.g., one of the computer nodes 108 a-108 d).

As illustrated by FIG. 31, the ledger transaction system 106 can performthe act 3102 of polling a transaction event counter at a first time toidentify a first count value. For example, in one or more embodiments,the ledger transaction system 106 submits an event count request for thefirst count value to a computer node storing the state data structure.In particular, the ledger transaction system 106 submits the event countrequest to a computer node that stores the most current state datastructure, which includes the most current count value for a transactionevent counter corresponding to a user account. In one or moreembodiments, the event count request for the first count value includesan access path, identifying the address of the user account of the statedata structure and the transaction event counter. In response to pollingthe transaction event counter, the ledger transaction system 106 candetermine the count value of the transaction event counter at the firsttime.

As shown in FIG. 31, the ledger transaction system 106 also performs theact 3104 of polling the transaction event counter at a second time toget a second count value. For example, in one or more embodiments, theledger transaction system 106 submits an additional event count requestfor the second value to a computer node storing the state datastructure. The computer node can be the same computer node to which theledger transaction system 106 submitted the event count request for thefirst count value or a different computer node of the distributeddigital ledger transaction network. In response to polling thetransaction event counter, the ledger transaction system 106 candetermine the count value of the transaction event counter at the secondtime.

Further, as shown in FIG. 31, the ledger transaction system 106 performsthe act 3106 of comparing the first count value and the second countvalue to determine whether new transaction events have occurred. Forexample, in comparing the first count value and the second count value,the ledger transaction system 106 can determine a difference in thecount values (e.g., the second count value is higher than the firstcount value). The ledger transaction system 106 can determine, based onthe difference in count values, that at least one new transaction eventhas occurred.

In some embodiments, however, the ledger transaction system 106 cancompare the first count value and the second count value and determinethat the first count value and the second count value are the same countvalue. By determining that the count values are the same, the ledgertransaction system 106 can verify that there is an absence transactionevents corresponding to the user account between the first time and thesecond time. In other words, by periodically polling a transaction eventcounter, the ledger transaction system 106 can provide a negative proofthat transaction events of a particular type have not occurred withregard to a particular account.

In one or more embodiments, based on comparing the first count value ofthe transaction event counter at the first time and the second countvalue of the transaction event counter at the second time, the ledgertransaction system 106 determines or identifies a sequence of countvalues. In particular, a sequence of count values can include adifference of count values greater than one. A sequence of accountvalues indicates that a sequence of events corresponding to the useraccount have occurred via the distributed digital ledger transactionnetwork.

In some embodiments, the ledger transaction system 106 can poll fortransaction event updates without submitting multiple requests. Inparticular, the ledger transaction system 106 can submit a request to acomputer node or configure a user account of the state data structure toprovide a notification whenever a transaction event or sequence ofevents associated with the user account is generated. In furtherembodiments, the ledger transaction system 106 can submit a request to acomputer node or configure the user account to provide transaction eventupdates periodically.

In addition to polling for transaction event updates, the ledgertransaction system 106 can operate on a client device (or other deviceon the distributed digital ledger transaction network) to retrieve eventdetails for one or more transaction events associated with a useraccount. FIG. 32 illustrates a block diagram for retrieving eventdetails for transaction events in accordance with one or moreembodiments. Though FIG. 32 illustrates the ledger transaction system106 retrieving event details for a sequence of events, it should benoted that the ledger transaction system 106 can function similarly toretrieve event details for a single transaction event.

As shown in FIG. 32, the ledger transaction system 106 (e.g., operatingon the client device 3202) transmits a transaction event detail request3204 for transaction event data associated with a user account 3212 ofthe distributed digital ledger transaction network. The ledgertransaction system 106 submits the transaction event detail request 3204to a computer node (e.g., the full node device 3210) of the distributeddigital ledger transaction network. In one or more embodiments, theledger transaction system 106 transmits the transaction event detailrequest 3204 in response to polling a transaction event counter anddetermining that at least one new transaction event associated with theuser account 3212 has occurred. In some embodiments, however, the ledgertransaction system 106 submits the transaction event detail request 3204as part of an independent request for event details (e.g., a request forevent details without polling the transaction event counter).

Further, in some embodiments, the ledger transaction system 106transmits the transaction event detail request 3204 to the same computernode to which the ledger transaction system 106 transmitted the eventcount request for count values. In particular, in one or moreembodiments, the event count request submitted for polling thetransaction event counter and the transaction event detail request arepart of a combined request to the computer node. For example, a clientdevice can submit a request that indicates if a change in event count isdetected the transaction event details should be returned to the clientdevice. In some embodiments, however, the ledger transaction system 106transmits the transaction event detail request 3204 to a differentcomputer node.

The transaction event detail request 3204 can include an access path3206 of the transaction event counter corresponding to the user account3212 and a count value of the transaction event counter. However, asshown in FIG. 32, the transaction event detail request 3204 can includea sequence of count values 3208 in addition to, or instead of, a singlecount value. Indeed, a transaction event detail request 3204 can includea transaction event sequence request for event details corresponding toa sequence of events.

As shown in FIG. 32, the full node device 3210 has access to the useraccount 3212 corresponding to the transaction event detail request 3204.In particular, in one or more embodiments, the computer node stores thestate data structure (i.e., the most current state data structure) ofthe distributed digital ledger transaction network. Further, thecomputer node can store the event data structure storing the transactionevent data as well as any other data structure of the distributeddigital ledger transaction network.

In response to transmitting the transaction event detail request 3204,the ledger transaction system 106 can receive, via a computer node ofthe distributed digital ledger transaction network, the transactionevent data 3214. In particular, as shown in FIG. 32, the transactionevent data 3214 includes a set of transaction event data correspondingto a plurality of events. The transaction event data 3214 can includedata retrieved from the event data structure. Specifically, as shown inFIG. 32, the transaction event data 3214 can include the access path ofthe transaction event counter corresponding to each transaction event.The transaction event data 3214 can further include the count value ofthe transaction event counter (labeled as the “event sequence no.”) whenthe corresponding transaction event occurred. Additionally, thetransaction event data 3214 can include the transaction event detailscorresponding to the particular transaction event.

As shown in FIG. 32, the ledger transaction system 106 can furthergenerate a Merkle proof 3216 as part of the transaction event data 3214(though shown separately). Indeed, as mentioned, the event datastructure can include an event Merkle tree and the state data structurecan include a state Merkle tree. The ledger transaction system 106 canutilize the Merkle proof to verify that the transaction event data 3214is accurate. Additional detail regarding generating a Merkle proof isprovided above.

In one or more embodiments, the ledger transaction system 106 receivesthe transaction event data 3214 from the full node device 3210 (i.e.,the same computer node to which the ledger transaction system 106submitted the transaction event detail request 3204). In someembodiments, however, the ledger transaction system 106 receives thetransaction event data 3214 from a different computer node of thedistributed digital ledger transaction network. In further embodiments,the ledger transaction system 106 receives the transaction event data3214 from multiple computer nodes of the distributed digital ledgertransaction network (e.g., receives different components of thetransaction event data 3214 from different computer nodes).

In one or more embodiments, the ledger transaction system 106 comparesthe set of transaction event data corresponding to the plurality ofevents with the sequence of count values 3208. In particular, the ledgertransaction system 106 can utilize the comparison to determinesatisfaction of the transaction event detail request 3204. For example,based on the comparison, the ledger transaction system 106 can determinewhether the plurality of events included in the transaction event data3214 includes a complete set of the sequence of events associated withthe transaction event detail request 3204 or an incomplete set. Toillustrate, if the plurality of events is missing data for a transactionevent having a sequence number included in the sequence of count values3208 of the transaction event detail request 3204, the ledgertransaction system 106 can determine that the plurality of events isincomplete.

Although the foregoing examples illustrate particular transactions,events, and requests, the ledger transaction system 106 can identify avariety of different events with regard to a variety of differenttransactions through a variety of different requests. For example, inaddition to (or in the alternative to) repeatedly polling a transactionevent counter, a client device can monitor a transaction event counterby sending a single call to a computer node to inform the client devicewhen a transaction event counter has changed. Similarly, rather thanpolling a transaction event counter and then transmitting an eventdetail request, a client device can send a single call to both monitor atransaction event counter and then return transaction event details upondetermining a change to the transaction event counter. Thus, the systemcan monitor a transaction event counter and (in response) receivetransaction event details reflecting a change to the transaction eventcounter.

By maintaining, at a computer node, transaction event counters thattrack the occurrence of particular transaction events, the ledgertransaction system 106 can provide transaction event data moreefficiently than conventional systems. In particular, the ledgertransaction system 106 can receive transaction event detail requeststhat specify the transaction events for which event details should beprovided. Accordingly, the ledger transaction system 106 can locate andprovide the precise event details requested, reducing the amount ofcomputing resources (e.g., processing time and power) required torespond to a query. By specifying, at a client device, the particulartransaction events for which event details are desired when submitting aquery, the ledger transaction system 106 avoids utilizing significantamounts of computing resources typically required to analyze theexcessive amounts of data received in response to the query.

Further, the ledger transaction system 106 is more accurate thanconventional systems. Specifically, by maintaining transaction eventcounters, the ledger transaction system 106 can more accurately provide,to a client device, updates to the occurrence of transaction events.Indeed, the ledger transaction system 106 avoids providing the falsepositives that are possible under conventional systems. Further, bypolling, at a client device, a transaction event counter correspondingto a user account of a state data structure stored at a computer node,the ledger transaction system 106 can obtain negative proofs andaccurately determine whether new transaction events have occurred.Specifically, by determining that a count value has not changed inresponse to polling the transaction event counter, the ledgertransaction system 106 can accurately determine the absence of newevents corresponding to a user account.

V. Consensus

A. Overview

As mentioned above, the ledger transaction system 106 can utilizevalidator node devices of the distributed digital ledger transactionnetwork to implement a consensus protocol that concludes in committingexecution results of a transaction block to storage. FIG. 33 shows ablock diagram of the ledger transaction system 106 using validator nodedevices to achieve consensus in accordance with one or more embodiments.As shown in FIG. 33, the ledger transaction system 106 performs an act3302 of utilizing a lead validator node device to propose a block oftransactions to the other validator node devices. The ledger transactionsystem 106 then performs an act 3304 of utilizing the validator nodedevices to submit votes on the block of transactions to the leadvalidator node device. Subsequently, the ledger transaction system 106performs an act 3306 of utilizing the lead validator node device toshare the voting results with the other validator node devices. Ifconsensus has been achieved, the ledger transaction system 106 cancommit the execution results to storage.

As discussed previously, in some embodiments, the ledger transactionsystem 106 utilizes a modified HotStuff protocol for consensus, asdescribed by M. Yin, D. Malkhi, M. K. Reiter, G. G. Golan, and A. Ittai,“Hotstuff: Bft consensus in the lens of blockchain,” arXiv preprintarXiv:1803.05069 (2018), which is incorporated by reference herein inits entirety. The ledger transaction system 106 can improve on thisprotocol in a variety of ways. For example, the ledger transactionsystem 106 the ledger transaction system 106 can vote, at the validatornode devices, on the results of executing a transaction block ratherthan the transaction block itself. By having validators collectivelysign the full resulting state of the block (rather than just thesequence of transactions), the ledger transaction system 106 is moreresistant to non-determinism bugs. This approach also allows clients touse quorum certificates to authenticate reads from the database.

In addition, the ledger transaction system 106 can utilize a pacemakerthat emits explicit timeouts, and validators rely on a quorum of thoseto move to the next round (without requiring synchronized clocks).Moreover, the ledger transaction system 106 can implement anunpredictable leader election mechanism in which the leader of a roundis determined by the proposer of the latest committed block using averifiable random function. This mechanism limits the window of time inwhich an adversary can launch an effective DoS attack against a leader.Furthermore, the ledger transaction system 106 uses aggregate signaturesthat preserve the identity validators who sign quorum certificates. Thisallows the ledger transaction system 106 to provide incentives tovalidators that contribute to quorum certificates without requiring acomplex threshold key setup.

In addition, as mentioned, the ledger transaction system 106 can providefor pipelining of the consensus protocol. Further, the ledgertransaction system 106 can implement security measures that enable thevalidator node devices to correctly resume the consensus protocol,allowing for stability on the distributed digital ledger transactionnetwork even after all of the computer nodes have crashed. Additionally,the ledger transaction system 106 can utilize smart contracts to managevoting rights among the validator node devices. In this manner, theledger transaction system 106 can improve the accuracy and efficiency ofconsensus, as will be discussed in greater detail below.

B. Performing Consensus on Execution Results

Many conventional blockchain systems perform consensus with regard toblocks of transactions. After achieving consensus, the conventionalsystems utilize computing devices participating in the network toexecute the agreed-upon transactions and commit the execution results tostorage. This method of post-consensus execution, however, can introduceinaccuracies in the stored execution results. For example, implementingpost-consensus execution of transaction blocks assumes that theexecution will be deterministic. In other words, the conventionalsystems often assume that every computer node will obtain the sameresults by executing the same block of transactions. However, technicalbugs or errors in execution can result in execution result differencesamong the different computer nodes. Accordingly, some computer nodesstore different versions of the digital ledger, providing an inaccurateportrayal of the digital ledger across the network.

As mentioned above, one or more embodiments of the ledger transactionsystem 106 perform consensus on execution results. Indeed, FIG. 34illustrates a block diagram of the ledger transaction system 106performing consensus on execution results in accordance with one or moreembodiments. In particular, as shown in FIG. 34 and as described above,the ledger transaction system 106 can, at the validator node devices3042 a-3042 c, receive a block of transactions from the lead validatornode device 3404, execute the block of transactions and vote on theexecution results. Upon determining that the execution results haveachieved consensus (e.g., that votes on the execution result fromvalidator nodes satisfies a consensus threshold), the ledger transactionsystem 106 can commit the results to storage at each of the validatornode devices 3402 a-3402 c.

By achieving consensus on the execution results of transactions, ratherthan the transactions themselves, the ledger transaction system 106operates more accurately. Indeed, the ledger transaction system 106anticipates the possibility of non-deterministic execution oftransactions at the validator node devices. Accordingly, the validatornode devices only write execution results that have been agreed uponinto storage, allowing for a more accurate representation of the digitalledger across the distributed digital ledger transact network.

C. Pipelining Consensus

Additionally, as mentioned above, one or more embodiments of the ledgertransaction system 106 integrate methods of pipelining into theconsensus process. In particular, the ledger transaction system 106 canimplement a contiguous 3-chain commit rule as part of the consensusprotocol. In particular, utilizing this approach a block at round n (andits full history of blocks) is committed when the “contiguous 3-chain”commit rule is met. Namely, if there exists a chain of three blocks withrespective quorum certificates at contiguous rounds n, as well assubsequent rounds n+1, n+2, then the block at round n and previouslinked blocks are committed. The commit rule eventually allows honestvalidators to commit a block. For instance, suppose a maliciousvalidator hides a quorum certificate that causes a commit of B₀. B₀ willeventually be committed, but it could take some time. This approach (aspart of the byzantine fault tolerance approach) can guarantee that allhonest validators will eventually accept a common history up to thatblock to avoid any possibility of forks.

FIG. 35 illustrates a block diagram of the ledger transaction system 106utilizing pipelining for consensus in accordance with one or moreembodiments. As shown in FIG. 35, the ledger transaction system 106 canutilize multiple rounds of consensus before committing a transactionblock (i.e., the execution results of the transaction block) to storage.In particular, as shown, the ledger transaction system 106 takes a firsttransaction block 3502 through a first round of voting 3504, a secondround of voting 3506, and a third round of voting 3508. Indeed, uponreceiving 2f+1 votes agreeing upon the first transaction block 3502 fromeach voting round, the ledger transaction system 106 can commit thefirst transaction block 3502 to storage. In some embodiments, the ledgertransaction system 106 generates a new consensus certificate with eachround of voting. In some embodiments, however, the ledger transactionsystem 106 generates the consensus certificate for a transaction blockafter the third round of voting (i.e., when the transaction block isready to be committed). In one or more embodiments, the ledgertransaction system 106 utilizes more or less voting rounds.

As shown in FIG. 35, with each new round of voting, the ledgertransaction system 106 begins voting on a new transaction block (i.e.,voting on a new authenticated data structure reflecting a new stateresulting from execution of the new transaction block). For example, asshown, the ledger transaction system 106 begins voting on a secondtransaction block 3510 during the second round of voting 3506 and beginsvoting on a third transaction block 3512 during the third round ofvoting 3508.

In one or more embodiments, the validator node devices do not expresslyvote separately on transaction blocks during a given round of voting.Rather, as discussed above, validator nodes can vote on an authenticateddata structure that reflects current and historical transactions and/orstates. Thus, by voting on a transaction block during a given round ofvoting, the validator node devices implicitly vote for the precedingtransaction blocks. Indeed, as mentioned above, when voting on atransaction block to reach consensus, the validator node devices canvote on the root value of the transaction tree resulting from executionof the transactions within the transaction block. Accordingly, thevalidator node devices vote on the entire history of the digital ledger(i.e., the entire transaction tree). This history of the digital ledgerinherently includes the execution results obtained from executing thetransactions within the previous transaction blocks. Thus, in one ormore embodiments, by voting on the second transaction block 3510 duringthe second round of voting 3506, the validator node devices implicitlyvote on the first transaction block 3502. Similarly, by voting on thethird transaction block 3512 during the third round of voting 3508, thevalidator node devices implicitly vote on the second transaction block3510 and the first transaction block 3502 (and every precedingtransaction block).

As shown in FIG. 35, the ledger transaction system 106 can obtainconsensus on the states resulting from execution of each transactionblock. Moreover, the ledger transaction system 106 can commit resultingauthenticated data structures to memory. For instance, after obtainingconsensus on a first authenticated data structure (after the first roundof voting 3504), obtaining consensus on a second authenticated datastructure (after the second round of voting 3506) and obtainingconsensus on a third authenticated data structure (after the third roundof voting 3608) the ledger transaction system 106 can commit the firstauthenticated data structure to memory.

By utilizing multiple rounds of voting before committing statereflecting a transaction block to storage, the ledger transaction system106 provides security against changes to the transaction block. Indeed,with each round of voting, the agreed upon execution results (and howthose execution results modify the transaction tree) become more stable.Specifically, the execution results of a particular transaction blockreceive stronger confirmation with regard to their validity. Thus, theledger transaction system 106 can use pipelining to improvesafety/accuracy of states (prior to committing states to memory) andprevent the occurrence of hard forks.

D. Safety Upon a System Restart

In one or more embodiments, the ledger transaction system 106 furtherimproves safety of the digital ledger by utilizing consensus restartrules that preserve consensus safety, even against a system reboot.Indeed, the ledger transaction system 106 can reduce the risk of a hardfork, even upon the reboot of all of the honest validator nodes on thedistributed digital ledger transaction network. FIG. 36 illustrates ablock diagram of the ledger transaction system 106 operating to providesafety against a system restart in accordance with one or moreembodiments.

As shown in FIG. 36, the ledger transaction system 106 performs an act3602 of saving the consensus state to storage before submitting a vote.Specifically, each validator node device generates and stores theconsensus state of that validator node device. The consensus state caninclude last voted round data and preferred block round data. Inparticular, the last voted round data includes data regarding the lastvoting round in which the particular validator node device voted (i.e.,the last voting round for which the validator node device voted on atransaction block). The preferred block round data can include dataregarding the head transaction block of a two-chain of consecutivetransaction blocks, the two-chain of transaction blocks including thetransaction blocks that have consensus certificates to the lastcommitted transaction block. In some embodiments, the ledger transactionsystem 106 stores the last committed transaction block (i.e., the rootvalue of the transaction tree resulting from the last committedtransaction block) and its two-chain (i.e., the transaction blocks thatcarry the consensus certificate to the last commit). In one or moreembodiments, upon submitting a vote in a round of voting, the ledgertransaction system 106 updates the consensus state in storage.

As shown in FIG. 36, the ledger transaction system 106 can also performan act 3604 of loading the consensus state upon restart. Indeed, theledger transaction system 106 can store a consensus restart rule at thevalidator node that requires loading the consensus state upon restart(and prior to any additional voting). Upon restart, the validator nodecan apply the consensus restart rule and load their respective savedconsensus state upon a restart. The validator node devices can thencontinue participating in consensus based on their loaded consensusstate.

To provide an example of the recovery process, in one or moreembodiments, the ledger transaction system 106 recovers the consensusstate upon system restart. In some embodiments, the ledger transactionsystem 106 can further recover the stored transaction blocks and quorumcertifications mentioned above. The ledger transaction system 106 canthen recover the last ledger information recorded in the state datastructure. The ledger transaction system 106 can utilize the last ledgerinformation as the root of a newly restarted tree (e.g., state tree).The ledger transaction system 106 can then rebuild the tree from all thetransaction blocks stored by the consensus manager in anticipation of asystem restart using a given root.

Thus, the validator node devices can continue participating in consensuswithout violating safety. For example, by having a validator node devicestore consensus states and load the consensus states upon restart (inaccordance with consensus restart rules imposed at each validator node),the ledger transaction system 106 prevents a validator node devicevoting in a voting round in which the validator node device alreadyparticipated (i.e., voting on a transaction block twice). Further, theledger transaction system 106 prevents a validator node device fromvoting on a transaction block from a previous voting round. The ledgertransaction system 106 can also avoid malicious attacks that seek toundermine consensus across validator nodes when restarting. Accordingly,the ledger transaction system 106 can improve (or guarantee) safety,even against the restart of all validator node devices in thedistributed digital ledger transaction network.

E. Managing Epochs of Voting Rights

As mentioned above, the ledger transaction system 106 can utilizevalidator node devices to achieve consensus with regard to transactionblocks. In one or more embodiments, the ledger transaction system 106implements stake-based voting to determine which computer nodesparticipate as validator node devices. In one or more embodiments, theledger transaction system 106 determines which computer nodesparticipate as validator node devices based on the user accounts of thedistributed digital ledger transaction network. For example, in someembodiments, the ledger transaction system 106 provides user accountsthat own digital assets (e.g., Coin resources) with votes to choose thevalidator node devices (i.e., stake-based voting). The ledgertransaction system 106 can, in some embodiments, provide votes based onthe value of the digital assets held by each account (e.g., more votesfor owning digital assets of higher value). The ledger transactionsystem 106 can maintain a vote index that maps the addresses ofpotential validator node devices with the number of votes submitted forthose validator node devices. In one or more embodiments, the ledgertransaction system 106 selects a predetermined number of validator nodedevices based on the addresses having the highest votes according to thevote index.

In one or more embodiments, upon initialization, the vote indexmaintained by the ledger transaction system 106 includes a single useraccount with a number of votes that corresponds to the total value ofdigital assets (e.g., the total value of the Coin resources) in thedistributed digital ledger transaction network. In some embodiments, thesingle user account is associated with one or more authorized devices.Having all available votes, the authorized devices can select theinitial set of validator node devices. As digital assets are transferredto other user accounts, however, those user account obtain votes toselect validator node devices.

In one or more embodiments, the ledger transaction system 106 utilizes asmart contract (e.g., a module) to implement and manage the stake-basedvoting. Indeed, in some embodiments, when a user account votes forvalidator node devices, the ledger transaction system 106 locks (i.e.,disables access to) the digital assets associated with the votessubmitted (i.e., “locks” the digital assets). The ledger transactionsystem 106 can utilize a smart contract to manage the locked digitalassets (e.g., an amount or timing of locked digital assets). The ledgertransaction system 106 can further utilize the smart contract to providepenalties to user accounts that act maliciously (e.g., by extracting afee from the locked digital assets associated with user accounts thatact maliciously). For example, if a validator node devices violates oneor more validator rules, the ledger transaction system 106 can penalizevalidator node devices that act maliciously (e.g., by withholding lockeddigital assets of the user account).

Additionally, the ledger transaction system 106 can utilize the smartcontract to implement and/or modify a “cool-off” period. Indeed, in oneor more embodiments, the ledger transaction system 106 utilizes thevalidator node devices voted for by user accounts to participate inconsensus for one epoch. In some embodiments, the ledger transactionsystem 106 avoids releasing locked digital assets of user account at theend of an epoch (i.e., when the validator set changes) to discouragemalicious behavior near the end of the epoch. Rather, the ledgertransaction system 106 implements a “cool-off” period (e.g., oneadditional epoch) and, at the end of the cool-off period, releases thelocked digital assets.

In one or more embodiments, the ledger transaction system 106 can alsoutilize the smart contract to implement changes to the stake-basedvoting. Indeed (based on the parameters of the smart contract andconsensus of the distributed digital ledger transaction network), theledger transaction system 106 can implement changes that configure thesmart contract to modify the stake-based voting. For example, ledgertransaction system 106 can utilize the smart contract to adjust thelength of the cool-off period or adjust the penalties extracted fromuser accounts that have acted maliciously. Although the foregoingdescription mentions various parameters that the ledger transactionsystem 106 can manage or modify by smart contract, the ledgertransaction system 106 can utilize smart contracts to manage and/ormodify various additional features, such as selected validator nodes,the length of an epoch, the number of validator nodes, validatorqualifications (e.g., qualifications for user accounts to becomevalidator nodes), validator rules (e.g., rules to determine whethernodes should be penalized), or the value of locked digital assets.

As mentioned above, the ledger transaction system 106 can utilize theselected set of validator node devices to implement a modified HotStuffleader-based consensus protocol. However, in one or more embodiments,the validator node devices can implement a variety of other consensusprotocols. For example, the validator node devices can implement aproof-of-work protocol or other proof-of stake protocols.

As mentioned, in one or more embodiments, the ledger transaction system106 can change the computer nodes on the distributed digital ledgertransaction network that participate as validator node devices. FIG. 37illustrates a block diagram of the ledger transaction system 106changing validator sets in accordance with one or more embodiments. Asshown in FIG. 37, in one or more embodiments, client device(s) 3702(e.g., authorized devices discussed above) can submit a transaction 3704proposing a new validator set 3706. Though FIG. 37 shows the clientdevice(s) 3702 submitting the transaction 3704, in some embodiments,other network participants can submit transactions to propose newvalidator sets. Once submitted, the current set of validator nodedevices 3708 votes on the transaction 3704 to achieve consensus. In someembodiments, the lead validator node device from the current set ofvalidator node devices 3708 places the transaction 3704 in a block ofits own. In some embodiments, the lead validator node device places thetransaction 3704 at the end of the transaction block to be proposed.

As further mentioned above, in some embodiments a given set of validatornode devices is fixed through an epoch. In one or more embodiments, anepoch begins upon execution of a particular transaction (e.g., a “startepoch” transaction) and ends upon committing the execution results of atransaction that agrees on the validator set of the next epoch. In oneor more embodiments, upon receiving the transaction 3704, the currentset of validator node devices 3708 checks to ensure that the transaction3704 was sent from a user account having authority to propose a new setof validator node devices. The current set of validator node devices canfurther check that an epoch has lapsed since the last change to the setof validator node devices. In some embodiments, the ledger transactionsystem 106 requires the transaction 3704 to satisfy both checks beforethe set of validator node devices can be changed.

In some embodiments, the ledger transaction system 106 utilizes a smartcontract (e.g., a module) to enforce a change in the set of validatornode devices at the epoch boundary (instead of afterwards). For example,FIG. 37 further illustrates a timeline 3710 of the digital ledger. Asshown in FIG. 37, when an epoch begins, a set of validator node devicesbegins validating (i.e., participating in consensus). During the epoch,the smart contract can gather information for the next change in the setof validator node devices (e.g., gathers votes for the new set ofvalidator node devices). The smart contract can then enforce thevalidator set change at the time the next boundary begins, if thetransaction proposing the new set of validator node devices has beenagreed upon.

Indeed, in one or more embodiments, the ledger transaction system 106requires at least one validator node device (e.g., the lead validatornode device) to submit a transaction (e.g., at a predeterminedblockchain time or for a predetermined version of the transaction tree),proposing to accept the validator set change from the smart contract. Insome embodiments, the ledger transaction system 106 prevents submissionof other proposed transaction blocks until that particular transactionhas been committed. In some embodiments, if the transaction proposingthe validator set change is rejected, the lead validator node device (orthe next lead validator node device) continues to make the same proposaluntil the change is accepted.

In one or more embodiments, upon changing the set of validator nodedevices, the ledger transaction system 106 drops (i.e., treats asinvalid) all proposed transaction blocks that have not been committed.Indeed, in some embodiments, the ledger transaction system 106 treatsthe transaction block that included the proposed change to the validatorsimilar to a genesis block. In other words, the ledger transactionsystem 106 requires that all subsequent transaction block proposalsinclude the transaction block proposing the validator set change as anancestor block.

In one or more embodiments, the ledger transaction system 106 maintainsvalidator set data that includes data for each validator node device inthe set. For example, the ledger transaction system 106 can maintainaccount information for user accounts associated with the set ofvalidator node devices, the public keys used for signing transactionblock proposals, the votes for the validator node devices, and metadatacorresponding to the validator node devices (e.g., the IP addresses ofthe validator node devices, the vote shares of the user accountsassociated with the validator node devices, etc.). The ledgertransaction system 106 can update this data with each new validator set.

In this manner, the ledger transaction system 106 can flexibly andsecurely manage and modify parameters for obtaining consensus across thedistributed digital ledger transaction network. Indeed, in contrast toconventional blockchain systems, the ledger transaction system 106 cansecurely manage voting rights (and other consensus parameters) via smartcontracts that can change to meet the demands of the distributed digitalledger transaction network and address threats that arise over time.

VI. Synchronization

A. Overview

New computer nodes can join the distributed digital ledger transactionnetwork (or rejoin after having been disconnected) to participate aseither a validator node device or a full node device. Upon joining thedistributed digital ledger transaction network, a computer node cansynchronize with one or more other computer nodes to download relevantdata (e.g., the data structures of the distributed digital ledgertransaction network). In one or more embodiments, the computer node doesnot inherently trust the data downloaded from the one or more othercomputer nodes; therefore, the computer node verifies the data upondownload. For example, the computer node can identify the current set ofvalidator node devices and their public keys. The computer node can thenobtain the root value of the transaction tree having 2f+1 signaturesobtained via consensus. Thus, when downloading the desired data from theone or more other computer nodes, the computer node can further downloadproof of the data and can verify the downloaded data and proof againstthe root value of the transaction tree.

One or more embodiments of the ledger transaction system 106 implementvarious features that improve synchronization. For example, the ledgertransaction system 106 can utilize incremental verification to improvethe efficiency with which a computer node downloads data. The ledgertransaction system 106 can further improve efficiency using parallelsynchronization. Additionally, the ledger transaction system 106 canutilize waypoints to guide computer nodes in synchronizing to thecorrect version/branch of the digital ledger.

B. Utilizing Incremental Verification and Parallel Synchronization

Under many conventional blockchain systems, a computer node downloadingdata via synchronization with a network may download the data in itsentirety and then verify the data. However, upon verification, thecomputer node may discover that the downloaded data is incorrect.Therefore, the computer node may repeat the download and verificationprocess, downloading the desired data from one or more other computernodes. The computer node may iteratively repeat this process until thecorrect data has been downloaded. Thus, the conventional blockchainsystems may utilize a significant amount of computing resources (e.g.,process power and time), both at the receiving computer node and thetransmitting computer nodes, in order for the computer node to receivethe desired data.

Additionally, many conventional blockchain systems synchronize to thenetwork, at a computer node, serially in a manner that requires asignificant computing time to do so. To illustrate, a computer node mayseek to generate a historical representation of the distributed digitalledger transaction (e.g., a representation of account states from thenetwork over a particular period of time). To accomplish this result,conventional systems often download transactions and then execute thetransactions, one at a time, to determine the state of the network afterthe execution of that transaction. Accordingly, the conventional systemsrequire a substantial amount of time to fully synchronize to thenetwork.

One or more embodiments of the ledger transaction system 106 utilizeincremental verification at a computer node synchronizing to thedistributed digital ledger transaction network to download data moreefficiently than conventional systems. FIG. 38 illustrates a blockdiagram of the ledger transaction system 106 utilizing incrementalverification to download segments of data to a computer node 3804 inaccordance with one or more embodiments. In particular, FIG. 38illustrates the ledger transaction system 106 downloading dataassociated with a data tree 3802. Though not shown in FIG. 38, the datatree 3802 is stored at another computer node of the distributed digitalledger transaction network.

Although the ledger transaction system 106 can utilize incrementalverification for any data structure described herein, in relation toFIG. 38, the data tree 3802 is a transaction tree. In particular, thedata tree 3802 is a transaction tree storing data corresponding totransactions executed across the distributed digital ledger transactionnetwork. As further shown, the ledger transaction system 106 downloadsthe data from the data tree 3802 to the computer node 3804 in segments.As an example, FIG. 38 shows the computer node 3804 downloading asegment of data from the data tree 3802 that corresponds to transactionslabeled “T2” through “T4.” Additionally, as shown in FIG. 38, thecomputer node 3804 downloads a proof for the data corresponding totransactions T2 through T4. In particular, the proof consists of allnodes of the data tree 3802 included at or within the boundariesprovided by the dashed lines (i.e., the nodes 3806 a-3806 e).

Thus, the ledger transaction system 106 can download data to thecomputer node 3804 from the data tree 3802 in segments (or portions).The ledger transaction system 106 also downloads, to the computer node3804, a proof corresponding to each segment (or portion) of downloadeddata. Accordingly, after downloading a segment of data and thecorresponding proof, the ledger transaction system 106 can verify thedownloaded data to determine its accuracy. Based on determining that thedownloaded data is accurate, the ledger transaction system 106 candownload the next segment of data and its corresponding proof. Moreover,upon verifying the different segments (using the different proofscorresponding to each segment), the computer node 3804 can generate orrecreate the authenticated data structure (e.g., by combining thedifferent segments).

In one or more embodiments, based on determining that the downloadeddata is inaccurate, the ledger transaction system 106 can identify anadditional computer node from which to request the desired data. Thus,the ledger transaction system 106 incrementally downloads data (fromvarious devices) and verifies the data before continuing the download.

In one or more embodiments, the ledger transaction system 106 furtherutilizes parallel synchronization to improve synchronization efficiency.For example, the ledger transaction system 106 can parallelize theincremental verification discussed above with regards to FIG. 38 inorder to improve synchronization. FIG. 39 illustrates the ledgertransaction system 106 downloading and verifying data in parallel inaccordance with one or more embodiments.

As shown in FIG. 39, the ledger transaction system 106 uploads data toserver(s) 3902. Specifically, the ledger transaction system 106 canupload the data to the server(s) 3902 from one or more computer nodes ofthe distributed digital ledger transaction network. As shown, the ledgertransaction system 106 uploads transaction data (e.g., from thetransaction tree 3904) and state data (e.g., from the state trees 3906a-3906 c) to the server(s) 3902. In one or more embodiments, the ledgertransaction system 106 uploads the transaction data to the server(s)3902 in transaction data batches of predetermined size. For example, theledger transaction system 106 can upload a transaction data batch to theserver(s) 3902 after every ten thousand transactions executed across thedistributed digital ledger transaction network.

As further shown in FIG. 39, the ledger transaction system 106 canupload the state data to the server(s) 3902 by uploading state datasnapshots. For example, as shown, the state tree 3906 a stores datacorresponding to “S0” of the distributed digital ledger transactionnetwork. The state tree 3906 b stores data corresponding to “S1000” andthe state tree 3906 c stores data corresponding to “S2000.” Thus, asshown in FIG. 39, the ledger transaction system 106 stores state datasnapshots representing every one thousandth state of the distributeddigital ledger transaction network.

The ledger transaction system 106 can, however, configure the snapshotsin a variety of other ways (i.e., configure how often a state datasnapshot is uploaded to the server(s) 3902). In some embodiments, theledger transaction system 106 uploads state data snapshots based on time(e.g., once a week, every day at noon, at the end of every month, etc.).In some embodiments, the ledger transaction system 106 coordinate thetransaction data batches to include transaction data for all of thetransactions executed on the distributed digital ledger transactionnetwork in between the state data snapshots. For example, the ledgertransaction system 106 can upload a first transaction data batch thatincludes all transactions between S0 and S1000 and a second transactiondata batch that includes all transactions between S1000 and S2000. Insum, the state data snapshots (e.g., state data structures) reflectperiod states of the distributed digital ledger transaction network

As shown in FIG. 39, the ledger transaction system 106 can access anddownload the data from the server(s) 3902. As illustrated, the ledgertransaction system 106 can download the data form the server(s) 3902 tothe verification devices 3908 a-3908 c. Indeed, the ledger transactionsystem 106 can utilize the verification devices 3908 a-3908 c todownload and verify batches of transaction data and state data. Forexample, the ledger transaction system 106 can utilize the verificationdevice 3908 a to download the state data snapshot corresponding to S0and one or more transaction data batches containing the transactionsexecuted between S0 and S1000. The verification device 3908 a can thenexecute every transaction in the transaction data batches to determinethe state data between S0 and S1000. In some embodiments, theverification device 3908 further downloads a proof corresponding to thedownloaded data (e.g., as discussed above with reference to FIG. 38) andverifies the downloaded data using the proof.

Meanwhile, as shown in FIG. 39, the ledger transaction system 106utilizes the verification devices 3908 b-3908 c to download, execute,and verify other transaction data batches in parallel. For example, theledger transaction system 106 can utilize the verification device 3908 bto download the state data snapshot corresponding to S1000 and one ormore transaction data batches containing the transactions executedbetween S1000 and S2000. The verification device 3908 b can then executethe transactions in the transaction data batches and further verify thedownloaded data using a proof corresponding to the downloaded data inparallel to the downloading, execution, and verification of theverification device 3908 a.

Though not shown in FIG. 39, the ledger transaction system 106 can thendownload the verified data from each of the verification devices 3908a-3908 c to a computer node. Indeed, in one or more embodiments, theledger transaction system 106 analyzes the data from the server(s) 3902in parallel in response to a request from a computer node (e.g., a fullnode seeking to synchronize its storage and generate a historicalrepresentation of the distributed digital ledger transaction network).The computer node can access the data structures stored at the server(s)3902, utilize the verification devices 3908 a-3908 c to analyze the datastructures in parallel and build a historical representation of thedistributed digital ledger transaction network. In particular, computernode can combine data received from each of the verification devices39089 a-3908 c to synchronize storage at the computer node. Thus, theledger transaction system 106 enables the computer node to synchronizeto the distributed digital ledger transaction network in a fraction ofthe time that would be necessary if downloading and verifying the dataserially.

In one or more embodiments, the ledger transaction system 106 determinesto download only a portion of the data associated with the distributeddigital ledger transaction network to a computer node. For example, theledger transaction system 106 can determine to download transaction dataand state data associated with the last decade to the computer node.Accordingly, the ledger transaction system 106 can identify the statedata snapshots that correspond to that time frame and the transactiondata batches that include the transactions within those state datasnapshots. Thus, the ledger transaction system 106 can enable a computernode to download any segment of the data associated with the distributeddigital ledger transaction network independent of the other storedsegments (i.e., independent of the other state data snapshots ortransaction data batches).

By utilizing incremental verification, the ledger transaction system 106operates more efficiently than conventional systems to synchronize acomputer node to the distributed digital ledger transaction network.Indeed, by downloading and verifying data in segments, the ledgertransaction system 106 can catch and respond to inaccuracies earlier inthe synchronization process—before the entire set of desired data hasbeen downloaded. Accordingly, the ledger transaction system 106 reducesthe amount of computing resources required to synchronize a computernode to the distributed digital ledger transaction network.

Additionally, by utilizing parallel synchronization, the ledgertransaction system 106 further improves the efficiency ofsynchronization. Specifically, the ledger transaction system 106 avoidsdownloading and verifying the data serially. Thus, the ledgertransaction system 106 reduces the amount of computing time required fora computer node to synchronize to the distributed digital ledgertransaction network.

C. Utilizing Waypoints for Synchronization

In one or more embodiments, the ledger transaction system 106 utilizeswaypoints to facilitate synchronization of computer nodes to thedistributed digital ledger transaction network. The ledger transactionsystem 106 can utilize waypoints to guide synchronization in a varietyof circumstances, such as adoption of a genesis block, assistingcomputer nodes coming back on line, and/or resolving (e.g., generatingor preventing) hard forks. For example, the ledger transaction system106 can utilize waypoints to guide a computer node that has beendisconnected from the distributed digital ledger transaction network ora new computer node joining the distributed digital ledger transactionnetwork. The ledger transaction system 106 can utilize waypoints toverify a particular version of the digital ledger that has been agreedupon via the consensus protocol (and thus avoid synchronizing to adifferent, disputed version of the digital ledger). Thus, utilizingwaypoints allows the ledger transaction system 106 to avoid theinaccuracies, inefficiencies, and security concerns that result fromdisputed versions of the digital ledger (e.g., hard forks or otherdisputed transactions) in conventional blockchain systems. Waypointsalso provide flexibility to allow the distributed digital ledgertransaction network to implement transactions and select branches asnecessary to address threats or evolving needs of the community.

For example, FIG. 40 illustrates utilizing waypoints in accordance withone or more embodiments. In particular, FIG. 40 illustrates a timeline4000 of the digital ledger. In particular, FIG. 40 illustrates awaypoint at the point 4004 of the timeline 4000 established to indicatethe correct branch of the digital ledger (e.g., the branch agreed uponvia the consensus protocol) to be downloaded by computer nodessynchronizing to the distributed digital ledger transaction network. Forexample, as shown in FIG. 40, a computer node disconnects from thedistributed digital ledger transaction network at point 4002 of thetimeline 4000 and attempts to reconnect or rejoin at point 4006. Uponreconnecting, the computer node can synchronize to the distributeddigital ledger transaction network by downloading all data (e.g., datastructures) related to the digital ledger generated between the point4002 and the point 4006 of the timeline.

The ledger transaction system 106 utilizes the waypoint at point 4004 toprovide a state of the distributed digital ledger transaction network towhich the computer node can synchronize. In particular, as shown in FIG.40, the waypoint can include a version reference and a root valuereference (e.g., a reference to an authenticated data structure).Indeed, the waypoint indicates that the correct branch of the digitalledger contains the root value indicated by the root value reference atthe version of the digital ledger (i.e., version of the transactiontree) indicated by the root value reference. In one or more embodiments,the computer node identifies the branch of the digital ledgercorresponding to the waypoint and then downloads that version of thedigital ledger. In some embodiments, the computer node can utilize thewaypoint to verify a branch of the digital ledger that has already beendownloaded.

Specifically, the ledger transaction system 106 can analyze proposeddata structures with the waypoint. For example, the computer nodeillustrated in FIG. 40 can download proposed data structures fromanother node of the distributed digital ledger transaction network. Thecomputer node can verify the accuracy of the proposed data structuresusing the waypoint. In particular, the computer node can compare aproposed data structure from the point 4004 with the waypoint at thepoint 4004. If the waypoint aligns with the proposed data structure(e.g., the version and root value align for the waypoint match theversion and root value of the proposed data structure), the computernode can verify the accuracy of the proposed data structure (and committhe proposed data structure to memory). If the waypoint does not alignwith the proposed data structure, the computer node can determine thatthe proposed structure is not valid (and not commit the proposed datastructure to memory). Moreover, the computer node can obtain alternateproposed data structures (e.g., from another computer device) toidentify proposed data structures that match the waypoint. In thismanner, the computer node can synchronize to the current state of theledger transaction system 106 while using the waypoint to verify theaccuracy of proposed data structures.

The ledger transaction system 106 provide waypoints to the computer nodein a variety of ways. For example, the ledger transaction system 106 cantransmit an indication (e.g., a push notification) to the computer nodewith the waypoint. The ledger transaction system 106 can provide thewaypoint in response to a query received from the computer node. In someembodiments, the ledger transaction system 106 provides the waypoint tothe computer node via a hexadecimal code that can be copied by thecomputer node or a digital visual code scannable by the computer node.In further embodiments, the computer node can receive manual inputassociated with the waypoint (the user providing the input can receivethe waypoint in a variety of ways, such as by word of mouth or printedadvertisement). In sum, the ledger transaction system 106 can publishthe waypoint in a variety of ways to allow computer nodes of thedistributed digital ledger transaction network to accurately andefficiently synchronize to a particular version of the digital ledger.

Although FIG. 40 illustrates using a waypoint for a computer node thatgoes offline, the ledger transaction system 106 can utilize waypoints toassist in a variety of additional circumstances. For example, the ledgertransaction system 106 can further utilize waypoints to facilitateacceptance of FTVM transactions (i.e., “forget the virtual machine”transactions that may not pass transaction verification procedures ofthe virtual machine). FIG. 41 illustrates a block diagram of the ledgertransaction system 106 utilizing waypoints associated with FTVMtransactions in accordance with one or more embodiments. In particular,as mentioned above, the ledger transaction system 106 generally executestransactions based on the attributes and procedures of modules invokedby the corresponding transaction script. In one or more embodiments, thevirtual machine rejects transaction scripts that do not adhere to theseattributes and procedures. An FTVM transaction includes a transactionthat explicitly violates the rules established by the attributes andprocedure (i.e., transaction procedures). In particular, an FTVMtransaction can describe a set of write operations to be performed onthe distributed digital ledger transaction network, that are prohibitedby transaction procedures. Accordingly, computer nodes of thedistributed digital ledger transaction network may reject suchtransactions.

However, in one or more embodiments, the ledger transaction system 106utilizes waypoints to indicate, to the computer nodes of the distributeddigital ledger transaction network, that FTVM transactions should beaccepted. Indeed, upon identifying a waypoint associated with an FTVMtransaction, a computer node can accept the FTVM transaction andsynchronize to the distributed digital ledger transaction network sothat the FTVM transaction is included in the data. Specifically, in oneor more embodiments, the validator node devices vote to confirm FTVMtransactions via the consensus protocol. If an FTVM transaction achievesconsensus among the validator node devices, the ledger transactionsystem 106 can implement the FTVM transaction on the distributed digitalledger transaction network. In one or more embodiments, the FTVMtransaction achieves consensus when a threshold number of validator nodedevices (e.g., 2 f+1 validator node devices) have accepted the FTVMtransaction.

For example, in one or more embodiments, the ledger transaction system106 can utilize waypoints to facilitate initialization of thedistributed digital ledger transaction network. For example, as shown inFIG. 41, the ledger transaction system 106 can generate a waypoint 4102associated with an FTVM transaction 4104 that describes a genesis block4106 (i.e., an initial block that publishes a digital currency module,generates the initial set of validator node devices, etc.). Indeed,because the genesis block 4106 creates digital currency, the genesisblock 4106 will violate procedures for managing digital assets on thedistributed digital ledger transaction network. The ledger transactionsystem 106, operating at a computer node 4108, can identify the waypoint4102 and accept (e.g., vote to confirm) the FTVM transaction 4104 basedon the waypoint 4102. Thus, the ledger transaction system 106 canutilize the waypoint 4102 to indicate that the genesis block—a blockthat may otherwise be rejected by computer nodes synchronizing to thedistributed digital ledger transaction network—is a legitimatetransaction.

As shown in FIG. 41, the ledger transaction system 106 can also use awaypoint to facilitate consensus of a hard fork. In particular, theledger transaction system 106 can utilize an FTVM transaction togenerate a hard fork and then generate a waypoint associated with theFTVM transaction so that computer nodes synchronizing to the digitalledger transaction network will accept the branch of the digital ledgerestablished by the FTVM transaction.

For example, as shown in FIG. 41, administrator device(s) 4110 cansubmit an FTVM transaction 4112 that describes a new validator set 4114.To illustrate, the administrator device(s) 4110 can submit the FTVMtransaction 4112 when a threshold number of the validator node devices4116 of the distributed digital ledger transaction network have lost orleaked their corresponding private keys. The administrator device(s)4110 can submit the FTVM transaction 4112 to generate a branch of thedigital ledger separate from an undesirable branch potentially createdby malicious computer nodes using the lost private keys. Though FIG. 41shows the FTVM transaction 4112 submitted by the administrator device(s)4110, in one or more embodiments, at least one of the computer nodes(e.g., validator node devices) of the distributed digital ledgertransaction network can submit an FTVM transaction proposing a newvalidator set.

As shown in FIG. 41, the administrator device(s) 4110 (or other computernode on the distributed digital ledger transaction network) can furtherprovide a waypoint 4118 associated with the FTVM transaction 4112. Thus,the ledger transaction system 106, operating at a computer node 4120,can identify the waypoint 4118 and accept (e.g., vote to confirm) theFTVM transaction 4112 based on the waypoint 4118. Thus, the ledgertransaction system 106 can utilize waypoints to flag the desired branchof the digital ledger generated as the result of a hard fork. Indeed,the ledger transaction system 106 can utilize an FTVM transaction togenerate a hard fork in order to avoid undesirable development of thedigital ledger and then utilize a waypoint to flag the branchcorresponding to the desired development.

As briefly mentioned above, in one or more embodiments, waypoints areconfigurable. Indeed, in one or more embodiments, the ledger transactionsystem 106 generates waypoints based on input (e.g., provided by theauthorized device(s) 4110 as described in FIG. 1 or other computernodes). Thus, the ledger transaction system 106 operates flexibly toaccommodate waypoint proposals. If a transaction associated with aproposed waypoint achieves consensus, the ledger transaction system 106can apply that transaction to the distributed digital ledger transactionnetwork.

VII. Programming Language

A. Overview

As mentioned above, some of the inefficiency, insecurity, and rigidityof conventional systems comes as a result of implementing programminglanguages. Indeed, conventional systems utilize programming languagesthat can require excessive processes to implement, introduceopportunities for manipulation, and undermine the ability to flexiblyimplement different transactions and processes on a blockchain.

In one or more embodiments, the ledger transaction system 106 utilizes aprogramming language that improves the efficiency, security, andflexibility of implementing systems. For example, as discussed abovewith reference to FIG. 23, the ledger transaction system 106 canimplement a programming language that utilizes transaction scripts thatinclude arbitrary programs that perform a variety of operations (e.g.,procedure calls) within a single script. The ledger transaction system106 can utilize the transactions generated using the programminglanguage to modify the state data structure of the distributed digitalledger network.

Additionally, as mentioned, the ledger transaction system 106 canutilize a programming language to improve data abstraction andconfigurability. Specifically, the ledger transaction system 106 canutilize the programming language to define modules and resourcesassociated with user accounts. As mentioned above, the ledgertransaction system 106 utilizes a module as a template from which tocreate one or more resources (i.e., instances of the module). As furthermentioned above, a resource corresponding to a particular module ismanaged by that module (i.e., managed by the attributes and proceduresdefined within that module) and is generally inaccessible to theprocedures defined outside of that module. Accordingly, the ledgertransaction system 106 can improve data abstraction by definingmodules—including the governing attributes and resources—providingcontrol over the methods used for creating, destroying, and modifyingthe associated resources. Additionally, the ledger transaction system106 can utilize the programming language to improve configurability bydefining modules that can be generated, updated, and/or exchanged toaccommodate changing needs on the distributed digital ledger transactionnetwork.

Further, the ledger transaction system 106 can utilize the programminglanguage to define custom resource types that enforce linearity. As willbe discussed in more detail below with regards to FIG. 42, the ledgertransaction system 106 can define resource types that encodeprogrammable digital assets, which behave like program values (e.g., canbe stored in data structures, passed as arguments to procedures, etc.).Additionally, the ledger transaction system 106 utilizes the programminglanguage to provide safety guarantees for these resources (e.g., must beused exactly once in a transaction and cannot be copied). In one or moreembodiments, the ledger transaction system 106 utilizes such features toimplement a digital currency that can be exchanged on the distributeddigital ledger transaction network.

In addition, as described in greater detail below, the ledgertransaction system 106 can utilize a programming language that checksreference safety at the bytecode level. Moreover, the ledger transactionsystem 106 can implement this bytecode verification using anauthenticated data structure (e.g., a tree structure). By utilizing aprogramming language coded on the bytecode level (e.g., without acompiler that introduces opportunities to undermine safety guarantees)together with a tree data structure, the ledger transaction system 106can significantly improve security and flexibility relative toconventional systems.

B. Utilizing Linear Types and Data Abstraction to Represent DigitalAssets

Many conventional blockchain systems utilize a programming language torepresent digital assets on a network. However, these programminglanguages often hamper the flexibility and security of implementingcomputing devices. For example, many conventional systems rigidlyrepresent digital assets as an integer value within a programminglanguage. Consequently, conventional systems fail to flexibly allowdigital assets to be stored in data structures, passed as an argument toa procedure, or returned from a procedure. Additionally, when generatinga digital asset, the conventional systems generally hardcode, into thelanguage semantics of the segments of code that define that digitalasset, certain scarcity protections that are desirable when managingdigital assets. Because these scarcity protections are hardcoded intothe language semantics, the conventional systems require manualreimplementation of those scarcity protections when generating a newdigital asset. Similarly, when generating a digital asset, conventionalsystems typically hardcode, into the language semantics, access controlsfor that digital assets, preventing flexible access controlcustomization.

In addition to flexibility concerns, conventional blockchain systems arealso error-prone and insecure. As mentioned, conventional blockchainsystems represent digital assets as integer values, which inherently donot behave like assets (e.g., integer values may be copied freely, whichis undesirable for some assets). Integer values inherently behavedifferently than assets; therefore, the conventional systems typicallycreate special methods of handling integer values to imitate handling anasset. To illustrate, many conventional systems track the holdings ofdigital assets using owner-to-asset map sets. These systems may transferan asset by invoking procedures that have side effects on these maps.Often, such procedures require two distinct steps: creating a sideeffect on the sender's side and then checking that the side effectoccurred on the receiver's side. The separation of these steps allowsfor malicious actors to insert unexpected and undesired behavior (e.g.,changing a balance between the receiver check and receiver reaction).Accordingly, conventional systems often expose the associated network(and the digital assets stored thereon) to attacks.

One or more embodiments of the ledger transaction system 106 utilizelinear data types to more flexibly represent digital assets associatedwith the distributed digital ledger transaction network. In particular,the ledger transaction system 106 can utilize a programming language todefine a digital asset (or a variety of other resources) using semanticsassociated with a linear data type. The ledger transaction system 106can then utilize linear typing rules corresponding to the linear datatype when managing (e.g., transferring) the digital asset. For example,the linear typing rules can include a first linear typing rule thatrequires the digital asset to be used a single time (i.e., exactly once)during a transaction and a second linear typing rule that preventsduplicating the digital asset via transaction. In this manner, theledger transaction system 106 can more flexibly and efficiently managedigital assets on the distributed digital ledger transaction network.

To provide an illustration, the ledger transaction system 106 implementsthe linear typing rules to control modification of the state datastructure of the distributed digital ledger transaction network. Inparticular, the ledger transaction system 106 can utilize the lineartyping rules in executing a transaction. For example, the ledgertransaction system 106 can identify a request for a transaction totransfer a digital asset via the distributed digital ledger transactionnetwork from a first user account to a second user account on the statedata structure. The ledger transaction system 106 can then determine(e.g., identify) the linear data type of the digital asset within therequest for the transaction. Subsequently, the ledger transaction system106 can execute the transaction utilizing the linear data type bytransferring the digital asset from the first user to the second useraccount on the state data structure subject to the set of linear typingrules corresponding to the linear data type. In one or more embodiments,the digital asset includes a digital currency maintained within thestate data structure of the distributed digital ledger transactionnetwork.

FIG. 42 illustrates block diagrams of the ledger transaction system 106implementing linear typing rules corresponding to a linear data type inaccordance with one or more embodiments. In particular, FIG. 42illustrates the ledger transaction system 106 performing enforcement ofthe linear typing rules against requests for transactions that wouldviolate the linear typing rules. In one or more embodiments, the ledgertransaction system 106 utilizes load-time bytecode verification to checksatisfaction of the linear typing rules.

As shown in FIG. 42, the ledger transaction system 106 identifies atransaction script 4202 (transaction scripts are discussed in moredetail above with reference to FIG. 23). In particular, the transactionscript 4202 can be included within a transaction request received at avalidator node device 4204. As shown in FIG. 42, the transaction script4202 provides instructions to be carried out by the validator nodedevice 4204 (or any other validator node device) in order to implement(e.g., execute) a transaction. Specifically, the transaction script 4202includes instructions for a transaction that transfers a digital assetfrom a user account on the state data structure of the distributeddigital ledger transaction network. As shown in FIG. 42, the transactionscript 4202 is composed of pseudocode representing a segment of bytecodethat describes the transaction to be implemented. It should be notedthat pseudocode is presented to simplify the illustration and that theledger transaction system 106 operates similarly using the correspondingsegment of bytecode.

For example, the transaction script 4202 includes the line 4206 ofpseudocode indicating that two inputs are included: the addressassociated with the user account of the recipient and an unsignedinteger representing the number of coins to be transferred to therecipient. In one or more embodiments, the inputs are provided by theclient device at the time of submitting the corresponding transactionrequest. The transaction script 4202 also includes the line 4208instructing the validator node device 4204 to withdraw a digital asset4210 (referred to as “coin” in the pseudocode) from a user account(i.e., sender account 4212) associated with the sender of thetransaction script 4202. The line 4214 instructs the validator nodedevice 4204 to deposit the digital asset 4210 to a user accountassociated with an identified payment recipient (i.e., “payee”).

As further shown in FIG. 42, the line 4216 instructs the validator nodedevice 4204 to similarly deposit the digital asset 4210 to a useraccount associated with an additional payment recipient (i.e.,“other_payee”). In other words, the transaction script 4202 includesinstructions to transfer the same digital asset from the sender account4212 to two different recipient user accounts of the distributed digitalledger transaction network (i.e., the transaction request associatedwith the transaction script 4202 attempts to spend the digital asset4210 twice). Though FIG. 42 illustrates the transaction requestattempting to spend the digital asset 4210 twice in the same request, itshould be noted that referring to the same digital asset in two separatetransactions requests would have the same effect.

Upon running the load-time bytecode verification, the ledger transactionsystem 106 can determine that the transaction request associated withthe transaction script 4202 violates the linear typing rulescorresponding to the linear data type of the digital asset 4210. Inparticular, the ledger transaction system 106 can determine that thedigital asset 4210 is associated with a linear data type within theprogramming language, and therefore subject to the linear typing rules.The ledger transaction system 106 can further determine that, byattempting to utilize the linear data type (i.e., the digital asset4210) twice, the transaction request violates the first linear typingrule to utilize the linear data type a single time in a transaction. Asshown in FIG. 42, in response to determining that the transactionrequest violates the first linear typing rule, the ledger transactionsystem 106 generates the bytecode verification error 4218. In one ormore embodiments, the ledger transaction system 106 transmits thebytecode verification error 4218 to the client device that sent thetransaction script 4202.

As shown in FIG. 42, the ledger transaction system 106 also identifiesthe transaction script 4220. Similar to the transaction script 4202 andas shown in FIG. 42, the transaction script 4220 provides instructionsfor a transaction that transfers the digital asset 4210 from the senderaccount 4212. In particular, the transaction script 4220 includes avariation of the instructions included in the transaction script 4202.

Specifically, as shown in FIG. 42, the transaction script 4220 includesthe line 4222 instructing the validator node device 4204 to withdraw thedigital asset 4210 from the sender account 4212. However, thetransaction script 4220 fails to include a line instructing thevalidator node device 4204 to deposit the digital asset 4210 into arecipient account. In short, the transaction script 4220 takes thedigital asset 4210 from the sender account 4212 but takes no furthersteps to use the digital asset 4210. Indeed, execution of thetransaction script 4220 may result in the complete loss of the digitalasset 4210 (i.e., the sender of the corresponding transaction requestcannot recover the digital asset 4210).

Upon running the load-time bytecode verification, the ledger transactionsystem 106 can determine that the transaction request associated withthe transaction script 4220 violates the linear typing rulescorresponding to the linear data type associated with the digital asset4210. In particular, the ledger transaction system 106 can determinethat, by failing to utilize the linear data type, the transactionrequest violates the first linear typing rule to utilize the linear datatype a single time in a transaction (e.g., the “coin” is withdrawn butnot used). As shown in FIG. 42, in response to determining that thetransaction request violates the first linear typing rule, the ledgertransaction system 106 rejects the transaction request and generates thebytecode verification error 4224. In one or more embodiments, the ledgertransaction system 106 transmits the bytecode verification error _24 tothe client device that sent the transaction request.

Additionally, as shown in FIG. 42, the ledger transaction system 106further identifies the transaction script 4230. In particular, thetransaction script 4230 provides instructions for a transaction thatgenerates a copy the digital asset 4210 from the sender account 4212. Asshown in FIG. 42, the transaction script 4230 includes the line 4232instructing the validator node device to copy the digital asset 4210(using the “copy(coin)” command) and depositing the copy of the digitalasset 4210 into a recipient user account. Indeed, the transactionrequest associated with the transaction script 4230 attempts toduplicate the digital asset 4210.

Upon running the load-time bytecode verification, the ledger transactionsystem 106 can determine that the transaction request associated withthe transaction script 4230 violates the linear typing rulescorresponding to the linear data type associated with the digital asset4210. In particular, the ledger transaction system 106 can determinethat, by attempting to duplicate the linear data type, the transactionrequest violates the second linear typing rule against duplicatinglinear data types. As shown in FIG. 42, in response to determining thatthe transaction request violates the second linear typing rule, theledger transaction system 106 rejects the transaction request andgenerates the bytecode verification error 4234. In one or moreembodiments, the ledger transaction system 106 transmits the bytecodeverification error 4234 to the client device that sent the transactionrequest.

In one or more embodiments, in addition to enforcing linear typingrules, the ledger transaction system 106 provides fungibility fordigital assets. Indeed, as mentioned above, a digital asset can includea digital currency. As such, the ledger transaction system 106 canimplement methods of dividing and merging digital currency unitscorresponding to digital assets. It should be noted, however, that theledger transaction system 106 can provide fungibility for various typesof digital assets. In one or more embodiments, the ledger transactionsystem 106 implements fungibility pursuant to the linear typing rules.

To provide an illustration, in one or more embodiments, the ledgertransaction system 106 implements a “Currency” module that utilizes dataabstraction to implement fungibility. Accordingly, the ledgertransaction system 106 manages the access, creation, and destruction ofresources that are created from the Currency module. For simplicity, thefollowing will refer to instances of the Currency module—i.e., resources(e.g., digital assets) associated with the Currency module—as “coins.”

Broadly, the ledger transaction system 106 can use a Currency module torestrict access to the “value” field of a coin and to restrict theability to allocate new coins. For example, in one or more embodiments,the ledger transaction system 106 prevents incrementing the value fieldof a coin associated with a user account unless a coin owned by anotheraccount has been transferred to the user account via the “deposit”procedure. If the deposit procedure has been invoked, the ledgertransaction system 106 can increment the value field of the coin by thevalue of the deposited coin (i.e., the ledger transaction system 106adds the value of the owned coin to the value of the coin associatedwith the user account). As another example, in some embodiments, theledger transaction system 106 prevents creating a new coin with value nunless the value field of an existing coin is decremented by n via thedeposit procedure. Thus, the ledger transaction system 106 can providefungibility for digital assets while preventing their arbitrarycreation.

By using the programming language to represent digital assets as lineardata types, the ledger transaction system 106 can manage digital assetsmore flexibly than conventional systems. In particular, the digitalassets can behave like program values. For example, by using linear datatypes to represent digital assets, the ledger transaction system 106 canstore digital assets in data structures, pass the digital assets asarguments to procedures, and return digital assets from procedures.Additionally, the ledger transaction system 106 can utilize a typesystem to implement flexible scarcity protections that are not availableto conventional systems. Indeed, the ledger transaction system 106 canimplement custom rules for creating and destroying assets. Further, byusing linear data types, the ledger transaction system 106 can generateflexible access controls in the same way as ordinary program values(e.g., using conditional statements, etc.).

Additionally, the ledger transaction system 106 can manage digitalassets more securely than conventional systems. Indeed, by representingdigital assets as linear data types via the programming language, theledger transaction system 106 avoids the special methods of handlingused by many conventional systems. For example, as mentioned above, theledger transaction system 106 can pass digital assets as arguments toprocedures (i.e., via parameter binding). Using digital assets in such away requires a single step. Consequently, the ledger transaction system106 narrows the opportunities for a malicious actor to insert unexpectedbehavior and makes it easier to write safe code.

C. Utilizing Static and Dynamic Analysis to Determine Reference Safety

Conventional blockchain systems may perform checks on the programminglanguage operating on the network to identify any errors (e.g., bugs)within the code. Moreover, many conventional systems analyze programssubmitted for execution on the network to determine whether the programsadhere to reference safety (i.e., the programs always refer to validmemory). Many conventional systems reject programs determined to notadhere to reference safety.

As mentioned above, a number of technical problems exist, however, withregard to ensuring reference safety utilizing conventional blockchainsystems. Indeed, under many conventional systems, memory includes a flatarray with addresses and has an arbitrary graph shape that is difficultto utilize. This memory structure leads to difficulty in analyzingprograms for reference safety (e.g., unless the analysis is done at thesource code level). Indeed, conventional systems memory includesarbitrary pointers and it can be inefficient (or impossible) to verifythat the pointers refer to valid memory. Additionally, many conventionalblockchain systems perform reference safety checks at run-time.Accordingly, such conventional systems often wait until attempting toexecute a program before determining whether it is safe for execution.

Though many conventional systems analyze programs for reference safetyat the source code level, such systems generally execute programs at themachine code level (i.e., processing programs written in source codeusing a compiler to generate the corresponding machine code). Using acompiler, however, compromises memory safety because malicious actorscan attack or bypass the compiler run on the machine code level.

One or more embodiments of the ledger transaction system 106 utilize acombination of static and dynamic analysis of transaction scripts andmodules to more accurately preserve reference safety. In particular, inone or more embodiments, the ledger transaction system 106 receives andexecutes transaction scripts at the bytecode level. The ledgertransaction system 106 can perform load-time bytecode verification toanalyze such transaction scripts at the bytecode level, identifyingreference safety issues even where a transaction script was writtendirectly in bytecode. In one or more embodiments, the ledger transactionsystem 106 also performs bytecode verification on modules submitted forstorage on the distributed digital ledger transaction network.Additionally, in one or more embodiments, the ledger transaction system106 utilizes a programming language that references memory using a treestructure memory model. In this manner, the ledger transaction system106 can more accurately and efficiently analyze for reference safety atthe bytecode level, identifying reference safety issues with improvedaccuracy.

As mentioned above, in one or more embodiments, the ledger transactionsystem 106 executes transaction scripts at the bytecode level. Forexample, the ledger transaction system 106 can execute transactionscripts written directly in bytecode. In some embodiments, the ledgertransaction system 106 receives transaction scripts written using sourcecode or an intermediate representation (IR), compiles the transactionscript into bytecode, and then executes the bytecode. Indeed, thetransaction script executed by the ledger transaction system 106—whetherthe script is written in bytecode or compiled into bytecode—contains asequence of bytecode operations.

As mentioned above, transaction scripts can invoke one or moreprocedures from one or more modules. In one or more embodiments, thecode defining the procedure of a module also includes a sequence ofbytecode operations. Thus, the ledger transaction system 106 maintainsexecution of bytecode when executing module procedures.

As further described above with regard to FIG. 2, in one or moreembodiments, the ledger transaction system 106 executes the bytecodeoperations of a transaction script using a stack-based virtual machine.For example, the ledger transaction system 106 can implement anoperation, which utilizes operands from the stack, and then push theresults back onto the stack.

Additionally, the ledger transaction system can utilize the stack-basedvirtual machine to implement procedure calls (i.e., module proceduresinvoked by transaction scripts). To illustrate, in one or moreembodiments, the ledger transaction system 106 provides a fixed vectorof typed local variables to each procedure and stores the inputparameters in the vector starting from position zero. The ledgertransaction system 106 then loads the input arguments to the procedurecall that were pushed on the stack by the caller into the vector oflocal variables. The ledger transaction system 106 can then utilize abytecode interpreter to begin executing a sequence of bytecodeoperations corresponding to the procedure at a zero offset. The ledgertransaction system 106 can proceed with execution by executing thebytecode operations in sequence unless a branch operation that causes ajump to a specific offset in the sequence is identified. By the returnof the procedure call, the ledger transaction system 106 can place theoutput values on the stack.

In one or more embodiments, the ledger transaction system 106 canutilize Boolean, arithmetic, equality, and branching operators via theprogramming language. In some embodiments, the ledger transaction system106 can utilize bytecode operations for loading constants and copying ormoving values stored in a local variable onto the stack and for poppingvalues from the stack into local variables. In further embodiments, theledger transaction system 106 can implement bytecode operations forcreating and dissolving structs and resources (structs and resourceswill be explained in more detail below). Indeed, the ledger transactionsystem 106 can utilize values from the stack to generate a struct andthen push the struct onto the stack. The ledger transaction system 106can perform the inverse bytecode operation by utilizing a struct at thetop of the stack to push the values stored in the struct onto the stack.

In some embodiments, the ledger transaction system 106 utilizes theprogramming language to support two types of values: unrestricted andresource. Indeed, the ledger transaction system can support primitivetypes, such as Booleans, 64-bit unsigned integers, 256-bit accountaddresses, and fixed-size byte arrays. The ledger transaction system 106can generate struct types and can further tag the struct type as aresource, generating a resource type. The ledger transaction system 106can treat all other types, including untagged struct types and primitivetypes, as unrestricted types. In one or more embodiments, the ledgertransaction system 106 implements resources, such as digital assets, asa linear data type using linear semantics provided by the programminglanguage, as is discussed in more detail above with regard to FIG. 42.

In one or more embodiments, a variable of resource type is a resourcevariable, and a variable of unrestricted type is an unrestrictedvariable. As discussed above, in some embodiments, a resource variablecannot be copied and must always be moved (i.e., using a moveoperation). Further, variables and fields of resource kind cannot bemutated in some embodiments. By contrast, in one or more embodiments, avariable or field of unrestricted type can be both copied and mutated.In some embodiments, the type of a field of a struct can be eitherprimitive or a struct. However, in some embodiments, an unrestrictedstruct type may not contain a field with a resource type, ensuring thatan unrestricted struct does not result in copying of a nested resource.Resources are discussed in more detail above with reference to FIG. 19.

In further embodiments, the ledger transaction system 106 further usesthe programming language to implement reference types. The ledgertransaction system 106 can classify a reference type as either mutableor immutable. The ledger transaction system 106 can utilize referencesto global and local variables and to fields of struct variables.

As mentioned above, in one or more embodiments, the ledger transactionsystem 106 utilizes a combined static-dynamic analysis to enforcereference safety. In particular, the ledger transaction system canstatically and dynamically analyze modules submitted for storage on thedistributed digital ledger transaction network as well as transactionscripts submitted for execution. In performing the analysis, the ledgertransaction system determines whether the transaction or module alwaysrefers to valid memory (i.e., never refers to memory that has beenfreed, never refers to memory that outside the bounds of the memoryarray, etc.). In one or more embodiments, the ledger transaction system106 further uses the combined static-dynamic analysis to ensure that, ifa live reference is an extension of (or equal to) another live referencein the same scope, that the references reside in variables of immutablereference type. FIG. 43 illustrates a block diagram for utilizing acombined static-dynamic analysis to enforce reference safety inaccordance with one or more embodiments.

As shown in FIG. 43, the ledger transaction system 106 can perform anact 4302 of performing static bytecode verification at load time.Indeed, the ledger transaction system 106 can utilize a bytecodeverifier to analyze a transaction script or module and enforce generalproperties of safety at load time.

To illustrate, in one or more embodiments, a module or transactionscript encodes a collection of tables of entities, such as constants,type signatures, struct definitions, and procedure definitions. Theledger transaction system 106 can utilize the bytecode verifier toperform structural checks to ensure these tables are well-formed. Inparticular, the bytecode verifier can identify errors that includeillegal table indices, duplicate table entries, illegal type signatures(e.g., a reference to a reference), etc. If the structural checks aresatisfied, the ledger transaction system 106 can utilize the bytecodeverifier to further perform semantic checking on procedure bodies. Whileperforming the semantic checks, the bytecode verifier can identifyerrors that include incorrect procedure arguments, dangling referencesto deallocated objects, illegal copy of resources, etc.

In one or more embodiments, the ledger transaction system 106 utilizesthe bytecode verifier to implement several phases of semanticverification. For example, in a CFG construction phase, the ledgertransaction system 106 can construct a control-flow graph by decomposingthe instruction sequence of the module or transaction script into acollection of instruction blocks. In particular, each instruction blockcan include a contiguous sequence of instructions. Indeed, the set ofall instructions included in the transaction script or module can bepartitioned among the instruction blocks. Additionally, each instructionblock can end with a branch or return instruction. By decomposing theinstruction sequence into instruction blocks, the ledger transactionsystem 106 ensures that branch targets land only at the beginning of aninstruction block. In some embodiments, the decomposition can alsoensure that the generated blocks are maximal.

The ledger transaction system 106 can additionally use the bytecodeverifier to implement a stack checking phase. In particular, thebytecode verifier analyzes the instructions blocks to ensure that aparticular invariant is maintained. In one or more embodiments, theinvariant requires that, when execution lands at the beginning of aninstruction block, the stack height is n (the height of the stack whenthe corresponding function begins executing) and that the stack heightis n or n+1, depending on whether the function does not return or doesreturn an argument, respectively. The bytecode verifier analyzes eachinstruction block separately, determining the effect of each instructionin the instruction block on the stack height. Indeed, the bytecodeverifier determines that the stack height does not go below n (anundesirable result) and is left at either n or n+1 (depending on thefinal instruction of the block and the return type of the function) atthe end of the instruction block.

The ledger transaction system 106 can further utilize the bytecodeverifier to implement a type checking phase. In particular, the bytecodeverifier can check that each operation and function (including bothbuilt-in functions and user-defined procedures) is invoked witharguments of appropriate types. In particular, the operands of anoperation are values located either in a local variable or on the stack.In one or more embodiments, the bytecode already provides the types oflocal variables of a function. In some embodiments, however, thebytecode verifier infers the types of stack values. The bytecodeverifier can perform this inference and the type checking of eachoperation separately for each instruction block. In one or moreembodiments, because the stack height at the beginning of eachinstruction block is n and does not go below n during the execution ofthe block, the bytecode verifier models the suffix of the stack startingat n for type checking the instructions within the instruction block.Indeed, the bytecode verifier can model this suffix using a stack oftypes, on which types are pushed and popped as the instruction stream ina block is processed. In one or more embodiments, the type stack and thestatically-known types of local variables are enough to type check eachinstruction.

In one or more embodiments, the ledger transaction system 106 canutilize the bytecode verifier to further analyze the transaction scriptor module for additional constraints on operations performed onresources. For example, as mentioned above, resource variables andfields generally cannot be copied or updated. In one or moreembodiments, the bytecode verifier performs these checks during the typechecking phase. In one or more embodiments, the bytecode verifierutilizes borrow tracking at the bytecode level to perform the static,load-time verification.

As shown in FIG. 43, the ledger transaction system 106 additionallyperforms an act 4304 of performing a dynamic check at runtime. Inparticular, the ledger transaction system 106 can utilize a bytecodeinterpreter to perform the dynamic runtime check. In one or moreembodiments, the ledger transaction system 106 performs one dynamicruntime check. Specifically, in one or more embodiments, the ledgertransaction system 106 performs the dynamic check by counting the numberof outstanding references to resource on the distributed digital ledgertransaction network. Indeed, the ledger transaction system 106 performsthe dynamic check to ensure that only one transaction or module has areference checked out to a resource at a given time.

In one or more embodiments, upon determining that a module ortransaction script is not memory safe, the ledger transaction system 106can reject the module or transaction script. Indeed, if the ledgertransaction system 106 determines the module or transaction script isnot memory safe via bytecode verification, the ledger transaction system106 can reject the module or transaction script before even attemptingto execute the code (i.e., at runtime).

As mentioned above, the ledger transaction system 106 can utilize theprogramming language to implement a tree structure memory model. Moredetail regarding the tree structure memory model (e.g., the state tree,the event tree, and the transaction tree) is provided above with regardto FIGS. 3-6. In one or more embodiments, the ledger transaction system106 prohibits a field of a struct to be a reference, ensuring that thetree structure memory model can be maintained (rather than requiring adirected acyclic graph).

By utilizing a programming language that references memory utilizing atree structure memory model, the ledger transaction system 106 improvesefficiency and security when compared to conventional systems. Indeed,the ledger transaction system 106 can uniquely name each node in thetree structure memory model based on the path from the root of the treeto the node. Consequently, the ledger transaction system 106 canimplement the reference safety analysis at the bytecode level ratherthan being restricted to source code analysis. This improves accuracy inanalyzing reference safety and reduces vectors for malicious attacks.Additionally, by performing the bulk of the reference safety analysisstatically at load time, the ledger transaction system 106 can identifytransaction scripts and modules that are not memory safe beforeattempting to execute the transaction script or module.

FIGS. 1-43, the corresponding text, and the examples provide a number ofdifferent methods, systems, devices, and non-transitorycomputer-readable media of the ledger transaction system 106. Inaddition to the foregoing, one or more embodiments can also be describedin terms of flowcharts comprising acts for accomplishing the particularresult, as shown in FIGS. 44-49. Each of FIGS. 44-49 may be performedwith more or fewer acts. Further, the acts shown in each of FIGS. 44-49may be performed in different orders. Additionally, the acts describedin each of FIGS. 44-49 may be repeated or performed in parallel with oneanother or in parallel with different instances of the same or similaracts.

For example, FIG. 44 illustrates a flowchart of a series of acts 4400for performing account eviction in accordance with one or moreembodiments. While FIG. 44 illustrates acts according to one embodiment,alternative embodiments may omit, add to, reorder, and/or modify any ofthe acts shown in FIG. 44. The acts of FIG. 44 can be performed as partof a method. Alternatively, a non-transitory computer-readable mediumcan store instructions that, when executed by at least one processor,cause a computing device to perform the acts of FIG. 44. In someembodiments, a system can perform the acts of FIG. 44. For example, inone or more embodiments, a system includes at least one processor and atleast one non-transitory computer-readable medium storing instructionsthereon that, when executed by the at least one processor, cause thesystem to perform the acts of FIG. 44.

The series of acts 4400 includes an act 4402 of generating anauthenticated data structure. For example, the act 4402 involvesgenerating an authenticated data structure of a distributed digitalledger transaction network, wherein the authenticated data structurecomprises a data tree comprising nodes having data representationsmapped to entries in a database. In one or more embodiments, thedatabase comprises a state database and the data tree comprises a statetree.

The series of acts 4400 also include an act 4404 of determiningexpiration of an eviction date associated with a node. For example, theact 4404 involves performing lazy deletion of data from theauthenticated data structure by accessing a data representation from anode of the data tree to determine expiration of an eviction dateassociated with node. In one or more embodiment, the node comprises anaccount state representation corresponding to the account data of a useraccount. The ledger transaction system 106 can generate the accountstate representation by applying a hash function to the account datacorresponding to the user account in the state database to generate ahash value for the account data corresponding to the user account; andcombining the hash value for the account data with the eviction dateassociated with the user account to generate the account staterepresentation corresponding to the user account.

In one or more embodiments, the ledger transaction system 106 determinesexpiration of the eviction date based on at least one of: a rent depositamount, a time of a last user account access, a time of a transactionthat transfers digital assets from the user account, or a time of atransaction that transfers digital assets to the user account.

The series of acts 4400 further includes the act 4406 of deleting one ormore entries corresponding to the node. For example, the act 4406involves performing the lazy deletion of the data from the authenticateddata structure by, in response to determining expiration of the evictiondate, deleting one or more entries corresponding to the node from thedatabase while maintaining the data representation within the data tree.In one or more embodiments, the one or more entries comprise accountdata corresponding to the user account.

In one or more embodiments, the series of acts 4400 further include actssurrounding the deletion of the one or more entries corresponding to thenode. For example, in one or more embodiments, the acts include deletingthe one or more entries corresponding to the node from the databasewithout a transaction event request on the distributed digital ledgertransaction network for deleting the one or more entries. In someembodiments, the acts include, prior to deleting the one or more entriescorresponding to the node from the database: receiving a request from aclient device, the request requiring use of the one or more entries; inresponse to receiving the request from the client device, accessing thedata representation from the node of the data tree to determineexpiration of the eviction date; and processing the request as if theone or more entries have been deleted. In further embodiments, the actsinclude, in response to receiving a transaction that references the useraccount, accessing the account state representation corresponding to theuser account from the state tree to determine expiration of the evictiondate and processing the transaction as if the user account had expired.

In some embodiments, the series of acts 4400 further includes acts forreinstating user accounts. For example, in one or more embodiments, theacts include identifying an account reinstatement request associatedwith the user account, wherein the account reinstatement requestcomprises proposed account data for the user account; and verifying theproposed account data for the user account based on the account staterepresentation within the state tree. In some embodiments, the actsfurther include re-caching the proposed account data associated with theuser account within the state database of the distributed digital ledgertransaction network based on verifying the proposed account data for theuser account. In some embodiments, the acts further include updating theeviction date associated with the node based on re-caching the proposedaccount data associated with the user account.

FIG. 45 illustrates a flowchart of a series of acts 4500 for generatingan encrypted sub-address unique to a transaction in accordance with oneor more embodiments. While FIG. 45 illustrates acts according to oneembodiment, alternative embodiments may omit, add to, reorder, and/ormodify any of the acts shown in FIG. 45. The acts of FIG. 45 can beperformed as part of a method. Alternatively, a non-transitorycomputer-readable medium can store instructions that, when executed byat least one processor, cause a computing device to perform the acts ofFIG. 45. In some embodiments, a system can perform the acts of FIG. 45.For example, in one or more embodiments, a system includes at least oneprocessor and at least one non-transitory computer-readable mediumstoring instructions thereon that, when executed by the at least oneprocessor, cause the system to perform the acts of FIG. 45.

The series of acts 4500 includes an act 4502 of identifying addressidentifiers corresponding to a user account. For example, the act 4502involves generating a request for a transaction between a first useraccount and a second user account of a distributed digital ledgertransaction network by identifying a main public address identifiercorresponding to the second user account, a sub-address identifiercorresponding to the second user account, and a public encryption key.In one or more embodiments, identifying the main public addressidentifier corresponding to the second user account, the sub-addressidentifier corresponding to the second user account, and the publicencryption key comprises scanning a digital visual code that encodes themain public address identifier, the sub-address identifier, and thepublic encryption key.

In one or more embodiments, the ledger transaction system identifies themain public address identifier, the sub-address identifier, and thepublic encryption key based on at least one of: a telephone number of auser corresponding to the second user account or a user ID of the user.

In some embodiments, the ledger transaction system 106 identifies themain public address identifier, the sub-address identifier, and thepublic encryption key based on an email address of a user correspondingto the second user account. For example, in some embodiments,identifying the main public address identifier, the sub-addressidentifier, and the public encryption key comprises: identifying adomain name and personal email identifier from the email address of theuser corresponding to the second user account; determining the mainpublic address identifier based on the domain name from the emailaddress; and determining the sub-address identifier based on thepersonal email identifier from the email address. Indeed, in someembodiments, identifying the main public address identifier, thesub-address identifier, and the public encryption key comprises, inresponse to providing the personal email identifier from the emailaddress to a remote server corresponding to the domain name, receivingthe public encryption key from the remote server corresponding to thedomain name.

In one or more embodiments, determining the main public addressidentifier based on the domain name comprises accessing a DNS recordcorresponding to the domain name to identify at least one of: the mainpublic address identifier or the public encryption key. In someembodiments, the ledger transaction system 106 further utilizes DNSSECto validate the main public address identifier or the public encryptionkey identified by accessing the DNS record corresponding to the domainname. In one or more embodiments, generating the encrypted sub-addresscomprises applying the public encryption key, determined by accessingthe DNS record, to the sub-address identifier determined based on thepersonal email identifier.

The series of acts 4500 also includes an act 4504 of generating a uniqueencrypted sub-address. For example, the act 4502 involves generating therequest for the transaction between the first user account and thesecond user account of the distributed digital ledger transactionnetwork by generating an encrypted sub-address unique to the transactionapplying the public encryption key to the sub-address identifier. In oneor more embodiments, generating the encrypted sub-address unique to thetransaction comprises adding a nonce value to the sub-addressidentifier; and applying the public encryption key to the sub-addressidentifier with the nonce value.

The series of acts 4500 further includes an act 4506 of submitting therequest for the transaction for execution. For example, the act 4506involves submitting, for execution via the distributed digital ledgertransaction network, the request for the transaction between the firstuser account and the second user account using the main public addressidentifier and the encrypted sub-address unique to the transaction.

FIG. 46 illustrates a flowchart of a series of acts 4600 for performingparallel execution of transactions in accordance with one or moreembodiments. While FIG. 46 illustrates acts according to one embodiment,alternative embodiments may omit, add to, reorder, and/or modify any ofthe acts shown in FIG. 46. The acts of FIG. 46 can be performed as partof a method. Alternatively, a non-transitory computer-readable mediumcan store instructions that, when executed by at least one processor,cause a computing device to perform the acts of FIG. 46. In someembodiments, a system can perform the acts of FIG. 46. For example, inone or more embodiments, a system includes at least one processor and atleast one non-transitory computer-readable medium storing instructionsthereon that, when executed by the at least one processor, cause thesystem to perform the acts of FIG. 46.

The series of acts 4600 includes an act 4602 of determining a firststate data structure. For example, the act 4602 involves determining afirst state data structure of a distributed digital ledger transactionnetwork, wherein the first state data structure represents accountstates of a plurality of user accounts of the distributed digital ledgertransaction network.

The series of acts 4600 also includes an act 4604 of identifying aplurality of transactions. For example, the act 4604 involvesidentifying a plurality of transactions comprising transactionsassociated with user accounts of the plurality of user accounts.

The series of acts 4606 further includes an act 4606 of performing apreliminary execution of the transactions in parallel. For example, theact 4606 involves performing a preliminary execution of the transactionsin parallel relative to the first state data structure to determine aplurality of transaction results and dependencies of the transactionswith regard to the user accounts.

In one or more embodiments, the transactions comprise a firsttransaction and a second transaction. Indeed, in some embodiments,performing the preliminary execution comprises determining a firsttransaction result reflecting application of the first transactionrelative to the first state data structure; determining a secondtransaction result reflecting application of the second transactionrelative to the first state data structure; and determining that thesecond transaction is not dependent upon the first transaction and thefirst transaction is not dependent upon the second transaction. In someembodiments, based on determining that the second transaction is notdependent upon the first transaction and the first transaction is notdependent upon the second transaction, the ledger transaction system 106applies the first transaction result and the second transaction resultrelative to the first state data structure.

In one or more embodiments, the ledger transaction system 106 generatesan intermediate state data structure by applying the first transactionresult to the first state data structure. In some embodiments, thetransactions further comprise a third transaction and performing thepreliminary execution comprises: determining a third transaction resultreflecting application of the third transaction relative to the firststate data structure; and determining that the third transaction dependson the first transaction. Indeed, in some embodiments, in response todetermining that the third transaction depends on the first transaction,the ledger transaction system 106 executes the third transaction againstthe intermediate state data structure to generate the second state datastructure. In one or more embodiments, determining that the thirdtransaction depends on the first transaction comprises determining thatthe third transaction and the first transaction are associated with asame user account from the user accounts.

Additionally, the series of acts 4600 includes an act 4608 of modifyingthe first state data structure by applying the transaction results. Forexample, the act 4608 involves modifying the first state data structureto a second state data structure by applying the plurality oftransaction results based on the dependencies of the transactions. Inone or more embodiments, the second state data structure is equivalentto executing the plurality of transactions serially against the firststate data structure.

In one or more embodiments, the ledger transaction system 106 receives adependency indicator for the plurality of transactions from a validatornode and identifies a first subset of the plurality of transactions anda second subset of the plurality of transactions based on the dependencyindicator. Accordingly, performing the preliminary execution of thetransactions comprises performing a preliminary execution of the firstsubset of the plurality of transactions based on the dependencyindicator. In some embodiments, the ledger transaction system 106generates an intermediate state data structure based on transactionresults from performing the preliminary execution of the first subset ofthe plurality of transactions; and generates the second state datastructure by executing the second subset of the plurality oftransactions relative to the intermediate state data structure.

FIG. 47 illustrates a flowchart of a series of acts 4700 for generatingtransaction events in accordance with one or more embodiments. WhileFIG. 47 illustrates acts according to one embodiment, alternativeembodiments may omit, add to, reorder, and/or modify any of the actsshown in FIG. 47. The acts of FIG. 47 can be performed as part of amethod. Alternatively, a non-transitory computer-readable medium canstore instructions that, when executed by at least one processor, causea computing device to perform the acts of FIG. 47. In some embodiments,a system can perform the acts of FIG. 47. For example, in one or moreembodiments, a system includes at least one processor and at least onenon-transitory computer-readable medium storing instructions thereonthat, when executed by the at least one processor, cause the system toperform the acts of FIG. 47.

The series of acts 4700 includes an act 4702 of generating a state datastructure. For example, the act 4702 involves generating a state datastructure of a distributed digital ledger transaction network, whereinthe state data structure comprises account data corresponding to a useraccount, a transaction event counter corresponding to the user account,and an address of the user account within the state data structure.

The series of acts 4700 also includes an act 4704 of modifying a countvalue of the transaction event counter. For example, the act 4704involves, in response to execution of a transaction comprising an eventcorresponding to the user account of the distributed digital ledgertransaction network, modifying a count value of the transaction eventcounter of the user account within the state data structure.

In one or more embodiments, the state data structure comprises anadditional transaction event counter corresponding to the user account,the transaction event counter corresponds to a first transaction eventtype, and the additional transaction event counter corresponds to asecond transaction event type. Accordingly, in some embodiments,modifying the count value of the transaction event counter of the useraccount comprises: determining that the transaction event corresponds tothe first transaction event type; and modifying the count value of thetransaction event counter based on determining that the transactionevent corresponds to the first transaction event type.

Further, the series of acts 4700 includes an act 4706 of generating atransaction event within an event data structure. For example, the act4706 involves, in response to execution of a transaction comprising anevent corresponding to the user account of the distributed digitalledger transaction network, further generating a transaction eventwithin an event data structure, the transaction event within the eventdata structure reflecting the address, the count value of thetransaction event counter of the user account, and details of the event.In one or more embodiments, the event data structure comprises an eventtree reflecting transaction events generated in response to theexecution of the transaction. Indeed, in one or more embodiments, theledger transaction system 106 determines a root value of the event treereflecting the transaction events corresponding to the transaction; andstores the root value of the event tree in a transaction tree of thedistributed digital ledger transaction network.

In one or more embodiments, the series of acts 4700 further includesacts for generating multiple transaction events in response to executionof a transaction. As mentioned above, in one or more embodiments, thestate set data structure comprises an additional transaction eventcounter corresponding to a second transaction event type. Indeed, insome embodiments, the transaction comprises an additional event of thesecond transaction event type. Accordingly, in one or more embodiments,the ledger transaction system 106 modifies an additional count value ofthe additional transaction event counter of the user account within thestate data structure; and generates an additional transaction eventwithin the event data structure, the additional transaction event withinthe event data structure reflecting the address, the additional countvalue of the additional transaction event counter of the user account,and details of the additional event.

In some embodiments, the series of acts 4700 further includes acts forproviding data in response to receiving a request. For example, in oneor more embodiments, the acts include receiving an event count requestfrom a client device, the event count request comprising a reference tothe transaction event counter; and, in response to receiving the eventcount request from the client device, providing the modified count valueof the transaction event counter from the state data structure to theclient device. In one or more embodiments, the reference to thetransaction event counter comprises an access path that reflects boththe address and the transaction event counter. In some embodiments, theacts include receiving a transaction event detail request from a clientdevice, the transaction event detail request comprising the count valueof the transaction event counter and an access path comprising theaddress and the transaction event counter; and, in response to receivingthe transaction event detail request, providing details of the eventfrom the event data structure to the client device together with aMerkle proof corresponding to the transaction event.

FIG. 48 illustrates a flowchart of a series of acts 4800 for receivingtransaction event data in accordance with one or more embodiments. WhileFIG. 48 illustrates acts according to one embodiment, alternativeembodiments may omit, add to, reorder, and/or modify any of the actsshown in FIG. 48. The acts of FIG. 48 can be performed as part of amethod. Alternatively, a non-transitory computer-readable medium canstore instructions that, when executed by at least one processor, causea computing device to perform the acts of FIG. 48. In some embodiments,a system can perform the acts of FIG. 48. For example, in one or moreembodiments, a system includes at least one processor and at least onenon-transitory computer-readable medium storing instructions thereonthat, when executed by the at least one processor, cause the system toperform the acts of FIG. 48.

The series of acts 4800 includes an act 4802 of monitoring a transactionevent counter. For example, the act 4802 involves monitoring atransaction event counter corresponding to a user account of a statedata structure stored at a computer node of a distributed digital ledgertransaction network. In one or more embodiments, based on monitoring thetransaction event counter, the ledger transaction system 106 determinesthe count value of the transaction event counter.

In some embodiments, monitoring the transaction event counter comprisespolling the transaction event counter at the computer node. Accordingly,in some embodiments, the ledger transaction system 106 determines thecount value of the transaction event counter at a first time; anddetermines an additional count value of the transaction event counter ata second time. Indeed, in some embodiments, the ledger transactionsystem 106 verifies an absence of events corresponding to the useraccount between the first time and the second time by determining thatthe count value of the transaction event counter at the first time andthe additional count value of the transaction event counter at thesecond time are the same count value.

The series of acts 4800 also includes an act 4804 of transmitting atransaction event detail request for transaction event data. Forexample, the act 4804 involves transmitting a transaction event detailrequest for transaction event data from an event data structure storedat one or more computer nodes of the distributed digital ledgertransaction network. In some embodiments, the transaction event detailrequest comprises the count value of the transaction event counter andan access path of the transaction event counter corresponding to theuser account within the state data structure. In one or moreembodiments, monitoring the transaction event counter and transmittingthe transaction event detail request are part of a combined request tothe computer node (e.g., the computer node discussed with reference tothe act 4602).

Further, the series of acts 4800 includes an act 4806 receivingtransaction event data. For example, the act 4806 involves, in responseto transmitting the transaction event detail request, receiving, via theone or more computer nodes, transaction event data corresponding to acount value determined from the transaction event counter. In one ormore embodiments, the event data structure comprises an event Merkletree and the state data structure comprises a state Merkle tree.Accordingly, in some embodiments, receiving the transaction event datacomprises receiving, from the computer node of the distributed digitalledger transaction network, a Merkle proof in response to transmittingthe transaction event detail request.

In one or more embodiments, the series of acts 4800 include acts forreceiving transaction event data regarding a sequence of events. Forexample, as mentioned above, monitoring the transaction event countercan include determining the count value of the transaction event counterat a first time; and determining an additional count value of thetransaction event counter at a second time. In some embodiments, basedon comparing the count value of the transaction event counter at thefirst time and the additional count value of the transaction eventcounter at the second time, the ledger transaction system 106 determinesa sequence of count values indicating that a sequence of eventscorresponding to the user account have occurred via the distributeddigital ledger transaction network. Accordingly transmitting thetransaction event detail request can comprise transmitting a transactionevent sequence request for the sequence of events; and receiving thetransaction event data can comprise receiving a set of transaction eventdata corresponding to a plurality of events. In some embodiments, theacts further include comparing the set of transaction event datacorresponding to the plurality of events with the sequence of countvalues to determine: that the plurality of events are a complete set ofthe sequence of events; or that the plurality of events set are anincomplete set of the sequence of events.

FIG. 49 illustrates a flowchart of a series of acts 4900 for executing atransaction utilizing linear data types subject to linear typing rulesin accordance with one or more embodiments. While FIG. 49 illustratesacts according to one embodiment, alternative embodiments may omit, addto, reorder, and/or modify any of the acts shown in FIG. 49. The acts ofFIG. 49 can be performed as part of a method. Alternatively, anon-transitory computer-readable medium can store instructions that,when executed by at least one processor, cause a computing device toperform the acts of FIG. 49. In some embodiments, a system can performthe acts of FIG. 49. For example, in one or more embodiments, a systemincludes at least one processor and at least one non-transitorycomputer-readable medium storing instructions thereon that, whenexecuted by the at least one processor, cause the system to perform theacts of FIG. 49.

The series of acts 4900 includes an act 4902 of identifying a requestfor a transaction to transfer a digital asset. For example, the act 4902involves identifying a request for a transaction to transfer a digitalasset via a distributed digital ledger transaction network from a firstuser account to a second user account on a state data structure. In oneor more embodiments, the digital asset comprises a digital currencymaintained within the state data structure of the distributed digitalledger transaction network.

The series of acts 4900 also includes an act 4904 of determining alinear data type of the digital asset. For example, the act 4904involves determining a linear data type of the digital asset within therequest for the transaction.

Further, the series of acts 4900 includes an act 4906 of executing thetransaction subject to linear typing rules. For example, the act 4906involves executing the transaction utilizing the linear data type bytransferring the digital asset from the first user account to the seconduser account on the state data structure subject to linear typing rulescorresponding to the linear data type. In one or more embodiments, thelinear typing rules are part of a programming language that is utilizedto control modification of the state data structure of the distributeddigital ledger transaction network. In some embodiments, the linear datatype of the digital asset is divisible and mergeable pursuant to theprogramming language and the linear typing rules.

In some embodiments, the linear typing rules comprises a first lineartyping rule to utilize the linear data type exactly once in thetransaction. In further embodiments, the linear typing rules comprises asecond linear typing rule against duplicating the linear data type.

To illustrate executing transactions subject to the linear typing rulescorresponding to a linear data type, in one or more embodiments, theseries of acts 4900 include additional acts, such as acts foridentifying an additional request for an additional transaction totransfer an additional digital asset represented by the linear data typevia the distributed digital ledger transaction network; determining theadditional request for the additional transaction utilizes theadditional digital asset represented by the linear data type more thanonce; and rejecting the additional request for the additionaltransaction based on determining that the linear data type of theadditional request for the additional transaction violates the firstlinear typing rule from the linear typing rules. In some embodiments,the additional acts include identifying an additional request for anadditional transaction to transfer an additional digital asset via thedistributed digital ledger transaction network from the first useraccount, wherein the additional request for the additional transactionfails to identify a recipient user account; and rejecting the additionalrequest for the additional transaction as a violation of the firstlinear typing rule from the linear typing rules.

In one or more embodiments, the ledger transaction system 106 performs aseries of acts for applying configurable storage deletion rules. Forexample, the series of acts can include acts of generating anauthenticated data structure of a distributed digital ledger transactionnetwork, wherein the authenticated data structure comprises a data treecomprising nodes mapped to entries in a database; determining aconfigurable data structure deletion rule corresponding to the computingdevice; and deleting a portion of the authenticated data structure basedon the configurable data structure deletion rule corresponding to thecomputing device. The series of acts can further include acts ofproviding options to modify the data structure deletion rules (includingoptions for deleting data corresponding to particular events, times,accounts or transactions); deleting child nodes based on a determinationthat nodes in a sub-tree are full; generating an authenticated datastructure that represents multiple states and deleting portions of theauthenticated data structure that represents one of the states; and/ordeleting data based on one or more characteristics of the computingdevice (e.g., whether the device is a validator node or full node).

In some embodiments, the ledger transaction system 106 performs a seriesof acts for tracking multiple writes in memory. For example, the seriesof acts can include acts of committing an authenticated state datastructure of a distributed digital ledger transaction network to memory,wherein the state data structure comprises a state tree corresponding toa plurality of user accounts of the distributed digital ledgertransaction network; identifying a transaction block comprisingtransactions associated with user accounts of the plurality of useraccounts; generating a scratch pad data structure comprising a statedata component reflecting modifications to the authenticated state datastructure based on the transaction block; and upon obtaining anindication of consensus via the distributed digital ledger transactionnetwork, committing a modified state data structure to memory based onthe state data component. The series of acts can further include acts ofclarifying that the state data component reflects only a subset of nodescorresponding to a subset of user accounts but includes pointers to theunchanged nodes of the authenticated data structure; identifyingadditional transactions (e.g., a second transaction and a thirdtransaction); generating the scratch pad data structure to includeadditional state data components reflecting the additional transactions(e.g., the second transaction and the third transaction) prior tocommitting to memory; obtaining consensus on some but not all of thetransactions stored in the scratch pad; and/or committing only thetransactions that achieve consensus to memory.

In one or more embodiments, the ledger transaction system 106 performs aseries of acts for separating and storing smart contract code and smartcontract data. For example, the series of acts can include acts ofidentifying a transaction script for modifying a resource stored withina user account of an authenticated data structure of a distributeddigital ledger transaction network, wherein: the transaction scriptcomprises a resource identifier, and the resource identifier reflectsthe resource, a module utilized to generate the resource, and aparticular user account storing the module; and based on the resourceidentifier, executing the transcript script by modifying the resource inaccordance with procedures defined by the module. The series of acts canfurther include acts of clarifying that the module comprises bytecodedeclaring resource and procedures; clarifying that the resourcecomprises a data value (e.g., a record that binds named fields tovalues); storing multiple modules at the same user account; and/orstoring multiple different resource types at the same user account. Insome embodiments, the module is stored in the same user account as theresource. In further embodiments, the module is stored in a differentuser account than the user account storing the resource.

In some embodiments, the ledger transaction system 106 performs a seriesof acts for utilizing resources to delegate account permissions. Forexample, the series of acts can include acts of generating a permissionresource stored within a first user account of an authenticated datastructure of a distributed digital ledger transaction network, whereinthe permission resource indicates one or more permissions to modify thefirst user account; executing a first transaction transferring thepermissions resource to a second user account of the authenticated datastructure; and executing a second transaction initiated by the seconduser account to modify the first user account based on the second useraccount having the permissions resource. The series of acts can furtherinclude acts of rejecting a transaction from the first user account (forno longer having the permissions resource). In one or more embodiments,the one or more permissions comprises a permission to withdraw digitalassets from the user account. In some embodiments, the second useraccount comprises a cold wallet. In further embodiments, transferringthe permissions resource moves the permissions resource to the seconduser account such that the first user account no longer comprises thepermissions resource.

Additionally, in some embodiments, the ledger transaction system 106performs a series of acts for decoupling account addresses fromcryptographic keys (i.e., implementing key rotation features). Forexample, the series of acts can include acts of generating anauthentication key corresponding to a user account of an authenticateddata structure of a distributed digital ledger transaction network;identifying a transaction for modifying the authentication key; and uponauthenticating the transaction utilizing the authentication key,executing the transaction by generating a new authentication key for theuser account. The series of acts can further include acts of utilizingthe new authentication key in a second transaction for the first useraccount; clarifying that the system generates the new authentication keywithout modifying an address of the user account within theauthenticated data structure; and/or modifying the new authenticationkey to an additional authentication key based on an additionaltransaction.

Further, in one or more embodiments, the ledger transaction system 106performs a series of acts for utilizing transaction scripts andinteracting with modules and resources. For example, the series of actscan include acts of identifying a transaction comprising a transactionscript for modifying a resource stored within a user account of anauthenticated data structure of a distributed digital ledger transactionnetwork, wherein: the resource is defined by a module, and thetransaction script comprises a call to a procedure defined by the moduleto modify the resource; and executing the transcript script by modifyingthe resource in accordance with the procedure defined by the module. Theseries of acts can further include acts of clarifying modules (datacode) and resources (data values); providing example procedures definedby the module, such as withdrawal or deposit procedures; and/orrejecting transactions that seek to modify the resource in a manner thatfails to satisfy the procedures defined by the module.

In one or more embodiments, the ledger transaction system 106 performs aseries of acts for utilizing smart contracts for performing taskssurrounding the execution of transactions. For example, the series ofacts can include acts of defining a transaction execution procedure viaa smart contract stored on an authenticated data structure of adistributed digital ledger transaction network; executing a transactionmodifying the execution procedure of the smart contract to a newexecution procedure; and executing a second transaction in accordancewith the new execution procedure. The series of acts can further includeacts of clarifying that the transaction execution procedure can includea procedure for validating transactions, deducting gas payments,incrementing sequence numbers, or distributing gas payments; identifyingcryptographic keys associated with a subset of devices (e.g.,authenticator devices) authorized to modify the transaction executionprocedure; and/or executing the transaction modifying the smart contractbased on the cryptographic keys.

In some embodiments, the ledger transaction system 106 performs a seriesof acts for implementing digital asset custody features. For example,the series of acts can include acts of generating access limits of auser account within an authenticated data structure of a distributeddigital ledger transaction network, the access limits comprising anaccess key limit or a threshold number of access keys to access theaccount; identifying a transaction comprising one or more access keys;and executing the transaction based on determining that the one or moreaccess keys satisfy the access key limit or the threshold number ofaccess keys. The series of acts can further include acts of clarifyingthat the threshold number of access keys comprises a percentage ornumber of access keys from a group of access keys; clarifying that theaccess key limit comprises a value key limit that reflects a thresholdvalue of digital assets accessible by utilizing a corresponding key;clarifying that the access key limit comprises a rate key limit thatreflects a threshold value of digital assets accessible within a timeperiod; and/or defining and utilizing sub-keys.

Additionally, in some embodiments, the ledger transaction system 106performs a series of acts for performing consensus on execution results.For example, the series of acts can include acts of identifying, via adistributed digital ledger transaction network, a transaction blockcomprising a plurality of transactions; executing the transaction blockrelative to a state data structure to generate an execution result; andupon determining that a plurality of votes on the execution result froma plurality of validator nodes satisfies a consensus threshold,committing the execution results to storage via a modified state datastructure.

Further, in one or more embodiments, the ledger transaction system 106performs a series of acts for implementing pipelined consensus. Forexample, the series of acts can include acts of generating a firstauthenticated data structure for a first state of a distributed digitalledger transaction network upon execution of a first block oftransactions; generating a second authenticated data structure for asecond state contiguous to the first state upon execution of a secondblock of transactions; generating a third authenticated data structurefor a third state contiguous to the second state upon execution of athird block of transactions; and in response to obtaining consensus onthe first authenticated data structure, the second authenticated datastructure, and the third authenticated data structure via thedistributed digital ledger transaction network, committing the firstauthenticated data structure to memory.

In some embodiments, the ledger transaction system 106 performs a seriesof acts for providing safety upon a system restart. For example, theseries of acts can include acts of generating a consensus state, at avalidator node of a distributed digital ledger transaction network, theconsensus state comprising last voted round data and preferred blockround data; storing a consensus restart rule at the validator node; andin response to detecting a restart at the validator node, loading theconsensus state in accordance with the consensus restart rule.

Additionally, in one or more embodiments, the ledger transaction system106 performs a series of acts for managing epochs of voting rights. Forexample, the series of acts can include acts of obtaining consensuscorresponding to a first transaction based on votes from a first set ofvalidator nodes of a distributed digital ledger transaction network;identifying a second transaction referencing a module definingparameters for modifying validator nodes; and modifying the first set ofvalidator nodes to a new set of validator nodes of the distributeddigital ledger transaction network by executing the second transactionaccording to the parameters defined by the module, and obtainingconsensus on the second transaction based on additional votes from thefirst set of validator nodes. The series of acts can further includeacts of checking to ensure that an epoch defined by the module haspassed before modifying the first set of validator nodes; holdingdigital assets from the first set of validator nodes during the epoch;holding the digital assets from the first set of validator nodes duringthe epoch and an additional cooling off period; identifying the secondset of validator nodes based on votes from computing devicescorresponding to user accounts of the distributed digital ledgertransaction network; obtaining consensus corresponding to a third(later) transaction based on votes from the second set of validatornodes; and/or modifying one or more additional consensus parameters viaan additional transaction. In one or more embodiments, the cooling offperiod comprises an additional epoch. In some embodiments, the number ofvotes for selecting the second set of validator nodes is based ondigital assets maintained by each user account.

In some embodiments, the ledger transaction system 106 performs a seriesof acts for utilizing parallel synchronization. For example, the seriesof acts can include acts of accessing a plurality of state datastructures and a plurality of transaction data structures correspondingto a distributed digital ledger transaction network, wherein theplurality of data structures reflect periodic states of the distributeddigital ledger transaction network, and the transaction data structuresreflect transactions between the period states; and building ahistorical representation of the distributed digital ledger transactionnetwork by utilizing a plurality of computing devices to analyze theplurality of state data structures and the plurality of transaction datastructures in parallel.

In further embodiments, the ledger transaction system 106 performs aseries of acts for utilizing incremental verification. For example, theseries of acts can include acts of downloading, at a computer node of adistributed digital ledger transaction network, a first portion of anauthenticated data structure and a first proof corresponding to thefirst portion; downloading a second portion of the authenticated datastructure and a second proof corresponding to the second portion; andupon verifying the first portion and the second portion based on thefirst proof and the second proof, generating, at the computer node, theauthenticated data structure based on the first portion and the secondportion.

In one or more embodiments, the ledger transaction system 106 performs aseries of acts for utilizing waypoints to facilitate synchronization.For example, the series of acts can include acts of identifying aproposed data structure of a distributed digital ledger transactionnetwork; determining a waypoint indicating an authenticated datastructure of the distributed digital ledger transaction network; andverifying the proposed data structure by comparing the proposed datastructure and the waypoint. The series of acts can also include acts ofdetermining that a computer node coming online to the distributeddigital ledger transaction network, and wherein verifying the proposeddata structure comprises synchronizing the computer node to the currentstate of the distributed digital ledger transaction network; and/oridentifying a second (e.g., invalid) proposed data structure andrejecting the second proposed data structure based on the waypoint. Insome embodiments, the waypoint comprises a version reference and a rootvalue of the proposed data structure. In further embodiments, theproposed data structure reflects one or more transactions that violatetransaction procedures and further comprising committing the proposeddata structure to memory based on the waypoint. In some embodiments, theproposed data structure reflects a genesis block of transactions.

Further, in one or more embodiments, the ledger transaction system 106performs a series of acts for utilizing static and dynamic analysis todetermine reference safety. For example, the series of acts can includeacts of identifying a transaction comprising a transaction script formodifying a user account of a tree data structure of a distributeddigital ledger transaction network; analyzing the transaction script atthe bytecode level to verify reference safety with respect to the treedata structure; and executing the transaction script at the bytecodelevel to modify the user account of the tree data structure. In one ormore embodiments, the transaction script is written using source code oran intermediate representation; and compiling the transaction scriptinto bytecode before analyzing the transaction script to verifyreference safety. In some embodiments, the transaction script invokesone or more modules stored at one or more user accounts of the tree datastructure. In further embodiments, analyzing the transaction scriptcomprises analyzing a sequence of bytecode operations defined by the oneor more modules stored at the one or more user accounts of the tree datastructure.

Embodiments of the present disclosure may comprise or utilize a specialpurpose or general-purpose computer including computer hardware, suchas, for example, one or more processors and system memory, as discussedin greater detail below. Embodiments within the scope of the presentdisclosure also include physical and other computer-readable media forcarrying or storing computer-executable instructions and/or datastructures. In particular, one or more of the processes described hereinmay be implemented at least in part as instructions embodied in anon-transitory computer-readable medium and executable by one or morecomputing devices (e.g., any of the media content access devicesdescribed herein). In general, a processor (e.g., a microprocessor)receives instructions, from a non-transitory computer-readable medium,(e.g., a memory, etc.), and executes those instructions, therebyperforming one or more processes, including one or more of the processesdescribed herein.

Computer-readable media can be any available media that can be accessedby a general purpose or special purpose computer system.Computer-readable media that store computer-executable instructions arenon-transitory computer-readable storage media (devices).Computer-readable media that carry computer-executable instructions aretransmission media. Thus, by way of example, and not limitation,embodiments of the disclosure can comprise at least two distinctlydifferent kinds of computer-readable media: non-transitorycomputer-readable storage media (devices) and transmission media.

Non-transitory computer-readable storage media (devices) includes RAM,ROM, EEPROM, CD-ROM, solid state drives (“SSDs”) (e.g., based on RAM),Flash memory, phase-change memory (“PCM”), other types of memory, otheroptical disk storage, magnetic disk storage or other magnetic storagedevices, or any other medium which can be used to store desired programcode means in the form of computer-executable instructions or datastructures and which can be accessed by a general purpose or specialpurpose computer.

A “network” is defined as one or more data links that enable thetransport of electronic data between computer systems and/or modulesand/or other electronic devices. When information is transferred orprovided over a network or another communications connection (eitherhardwired, wireless, or a combination of hardwired or wireless) to acomputer, the computer properly views the connection as a transmissionmedium. Transmissions media can include a network and/or data linkswhich can be used to carry desired program code means in the form ofcomputer-executable instructions or data structures and which can beaccessed by a general purpose or special purpose computer. Combinationsof the above should also be included within the scope ofcomputer-readable media.

Further, upon reaching various computer system components, program codemeans in the form of computer-executable instructions or data structurescan be transferred automatically from transmission media tonon-transitory computer-readable storage media (devices) (or viceversa). For example, computer-executable instructions or data structuresreceived over a network or data link can be buffered in RAM within anetwork interface module (e.g., a “NIC”), and then eventuallytransferred to computer system RAM and/or to less volatile computerstorage media (devices) at a computer system. Thus, it should beunderstood that non-transitory computer-readable storage media (devices)can be included in computer system components that also (or evenprimarily) utilize transmission media.

Computer-executable instructions comprise, for example, instructions anddata which, when executed by a processor, cause a general-purposecomputer, special purpose computer, or special purpose processing deviceto perform a certain function or group of functions. In someembodiments, computer-executable instructions are executed on ageneral-purpose computer to turn the general-purpose computer into aspecial purpose computer implementing elements of the disclosure. Thecomputer executable instructions may be, for example, binaries,intermediate format instructions such as assembly language, or evensource code. Although the subject matter has been described in languagespecific to structural features and/or methodological acts, it is to beunderstood that the subject matter defined in the appended claims is notnecessarily limited to the described features or acts described above.Rather, the described features and acts are disclosed as example formsof implementing the claims.

Those skilled in the art will appreciate that the disclosure may bepracticed in network computing environments with many types of computersystem configurations, including, personal computers, desktop computers,laptop computers, message processors, hand-held devices, multiprocessorsystems, microprocessor-based or programmable consumer electronics,network PCs, minicomputers, mainframe computers, mobile telephones,PDAs, tablets, pagers, routers, switches, and the like. The disclosuremay also be practiced in distributed system environments where local andremote computer systems, which are linked (either by hardwired datalinks, wireless data links, or by a combination of hardwired andwireless data links) through a network, both perform tasks. In adistributed system environment, program modules may be located in bothlocal and remote memory storage devices.

Embodiments of the present disclosure can also be implemented in cloudcomputing environments. In this description, “cloud computing” isdefined as a model for enabling on-demand network access to a sharedpool of configurable computing resources. For example, cloud computingcan be employed in the marketplace to offer ubiquitous and convenienton-demand access to the shared pool of configurable computing resources.The shared pool of configurable computing resources can be rapidlyprovisioned via virtualization and released with low management effortor service provider interaction, and then scaled accordingly.

A cloud-computing model can be composed of various characteristics suchas, for example, on-demand self-service, broad network access, resourcepooling, rapid elasticity, measured service, and so forth. Acloud-computing model can also expose various service models, such as,for example, Software as a Service (“SaaS”), Platform as a Service(“PaaS”), and Infrastructure as a Service (“IaaS”). A cloud-computingmodel can also be deployed using different deployment models such asprivate cloud, community cloud, public cloud, hybrid cloud, and soforth. In this description and in the claims, a “cloud-computingenvironment” is an environment in which cloud computing is employed.

FIG. 50 illustrates a block diagram of an example computing device 5000that may be configured to perform one or more of the processes describedabove. One will appreciate that one or more computing devices, such asthe computing device 5000 may represent the computing devices describedabove (e.g., the client devices 112 a-112 n, and the computer nodes114). In one or more embodiments, the computing device 5000 may be amobile device (e.g., a mobile telephone, a smartphone, a PDA, a tablet,a laptop, a camera, a tracker, a watch, a wearable device, etc.). Insome embodiments, the computing device 5000 may be a non-mobile device(e.g., a desktop computer or another type of client device). Further,the computing device 5000 may be a server device that includescloud-based processing and storage capabilities.

As shown in FIG. 50, the computing device 5000 can include one or moreprocessor(s) 5002, memory 5004, a storage device 5006, input/outputinterfaces 5008 (or “I/O interfaces 5008”), and a communicationinterface 5010, which may be communicatively coupled by way of acommunication infrastructure (e.g., bus 5012). While the computingdevice 5000 is shown in FIG. 50, the components illustrated in FIG. 50are not intended to be limiting. Additional or alternative componentsmay be used in other embodiments. Furthermore, in certain embodiments,the computing device 5000 includes fewer components than those shown inFIG. 50. Components of the computing device 5000 shown in FIG. 50 willnow be described in additional detail.

In particular embodiments, the processor(s) 5002 includes hardware forexecuting instructions, such as those making up a computer program. Asan example, and not by way of limitation, to execute instructions, theprocessor(s) 5002 may retrieve (or fetch) the instructions from aninternal register, an internal cache, memory 5004, or a storage device5006 and decode and execute them.

The computing device 5000 includes memory 5004, which is coupled to theprocessor(s) 5002. The memory 5004 may be used for storing data,metadata, and programs for execution by the processor(s). The memory5004 may include one or more of volatile and non-volatile memories, suchas Random-Access Memory (“RAM”), Read-Only Memory (“ROM”), a solid-statedisk (“SSD”), Flash, Phase Change Memory (“PCM”), or other types of datastorage. The memory 5004 may be internal or distributed memory.

The computing device 5000 includes a storage device 5006 includingstorage for storing data or instructions. As an example, and not by wayof limitation, the storage device 5006 can include a non-transitorystorage medium described above. The storage device 5006 may include ahard disk drive (HDD), flash memory, a Universal Serial Bus (USB) driveor a combination these or other storage devices.

As shown, the computing device 5000 includes one or more I/O interfaces5008, which are provided to allow a user to provide input to (such asuser strokes), receive output from, and otherwise transfer data to andfrom the computing device 5000. These I/O interfaces 5008 may include amouse, keypad or a keyboard, a touch screen, camera, optical scanner,network interface, modem, other known I/O devices or a combination ofsuch I/O interfaces 5008. The touch screen may be activated with astylus or a finger.

The I/O interfaces 5008 may include one or more devices for presentingoutput to a user, including, but not limited to, a graphics engine, adisplay (e.g., a display screen), one or more output drivers (e.g.,display drivers), one or more audio speakers, and one or more audiodrivers. In certain embodiments, I/O interfaces 5008 are configured toprovide graphical data to a display for presentation to a user. Thegraphical data may be representative of one or more graphical userinterfaces and/or any other graphical content as may serve a particularimplementation.

The computing device 5000 can further include a communication interface5010. The communication interface 5010 can include hardware, software,or both. The communication interface 5010 provides one or moreinterfaces for communication (such as, for example, packet-basedcommunication) between the computing device and one or more othercomputing devices or one or more networks. As an example, and not by wayof limitation, communication interface 5010 may include a networkinterface controller (NIC) or network adapter for communicating with anEthernet or other wire-based network or a wireless NIC (WNIC) orwireless adapter for communicating with a wireless network, such as aWI-FI. The computing device 5000 can further include a bus 5012. The bus5012 can include hardware, software, or both that connects components ofcomputing device 5000 to each other.

In the foregoing specification, the invention has been described withreference to specific example embodiments thereof. Various embodimentsand aspects of the invention(s) are described with reference to detailsdiscussed herein, and the accompanying drawings illustrate the variousembodiments. The description above and drawings are illustrative of theinvention and are not to be construed as limiting the invention.Numerous specific details are described to provide a thoroughunderstanding of various embodiments of the present invention.

The present invention may be embodied in other specific forms withoutdeparting from its spirit or essential characteristics. The describedembodiments are to be considered in all respects only as illustrativeand not restrictive. For example, the methods described herein may beperformed with less or more steps/acts or the steps/acts may beperformed in differing orders. Additionally, the steps/acts describedherein may be repeated or performed in parallel to one another or inparallel to different instances of the same or similar steps/acts. Thescope of the invention is, therefore, indicated by the appended claimsrather than by the foregoing description. All changes that come withinthe meaning and range of equivalency of the claims are to be embracedwithin their scope.

What is claimed is:
 1. A method comprising: generating an authenticateddata structure of a distributed digital ledger transaction network, theauthenticated data structure comprising a data tree storing data withina plurality of nodes; determining a first configurable storagemanagement rule for a computer node of the distributed digital ledgertransaction network that is different than a second configurable storagemanagement rule for at least one other computer node of the distributeddigital ledger transaction network; and maintaining the authenticateddata structure at the computer node based on the first configurationstorage management rule.
 2. The method of claim 1, wherein: determiningthe first configurable storage management rule for the computer nodecomprises determining a data storage deletion rule for deletingcompleted subtrees of the data tree; and maintaining the authenticateddata structure at the computer node based on the first configurationstorage management rule comprises: determining that a subtree of thedata tree is complete, the subtree comprising a subtree root node and aplurality of child nodes; and deleting the plurality of child nodes ofthe subtree based on the data storage deletion rule.
 3. The method ofclaim 2, wherein: the authenticated data structure further comprises adatabase, and nodes of the data tree are mapped to entries in thedatabase; and maintaining the authenticated data structure at thecomputer node based on the first configuration storage management rulecomprises deleting a plurality of entries in the database thatcorrespond to the plurality of child nodes of the subtree based on thedata storage deletion rule.
 4. The method of claim 2, wherein generatingthe authenticated data structure comprising the data tree comprisesgenerating a transaction data structure comprising a transaction treethat includes nodes storing data representative of transactions executedacross the distributed digital ledger transaction network.
 5. The methodof claim 1, wherein generating the authenticated data structurecomprising the data tree comprises generating a state data structurecomprising a state tree that includes nodes storing data representativeof user accounts of the distributed digital ledger transaction network;and maintaining the authenticated data structure at the computer nodebased on the first configuration storage management rule comprises:determining a change in state of the distributed digital ledgertransaction network; and overwriting the state tree of the state datastructure with a subsequent state tree based on determining the changein state.
 6. The method of claim 1, wherein: generating theauthenticated data structure comprising the data tree comprisesgenerating a state data structure comprising a state tree that includesnodes storing data representative of user accounts of the distributeddigital ledger transaction network; and maintaining the authenticateddata structure at the computer node based on the first configurationstorage management rule comprises: determining a change in state of thedistributed digital ledger transaction network that corresponds tochanges to one or more user accounts of the distributed digital ledgertransaction network; generating a state tree component comprising one ormore nodes that reflect the changes to the one or more user accountsbased on the change in state; and associating the one or more nodes ofthe state tree component with one or more nodes of the state tree. 7.The method of claim 6, wherein associating the one or more nodes of thestate tree component with the one or more nodes of the state treecomprises associating the one or more nodes of the state tree componentto the one or more nodes of the state tree that correspond to useraccounts that remain unchanged after the change in state.
 8. The methodof claim 7, maintaining the authenticated data structure at the computernode based on the first configuration storage management rule furthercomprises deleting at least one node of the state tree that correspondsto a user account that changed with the change in state.
 9. The methodof claim 1, wherein determining the first configurable storagemanagement rule for the computer node comprises determining the firstconfigurable storage management rule based on at least one of a role ofthe computer node within the distributed digital ledger transactionnetwork, one or more user preferences received via the computer node, orstorage capabilities of the computer node.
 10. The method of claim 1,further comprising: determining a third configurable storage managementrule for the computer node of the distributed digital ledger transactionnetwork that is different than the first configurable storage managementrule and the second configurable storage management based on a change inuser preferences for the computer node or a change in storage capacityof the computer node; and maintaining the authenticated data structureat the computer node based on the third configuration storage managementrule.
 11. A non-transitory computer-readable medium storing instructionsthereon that, when executed by at least one processor, cause a computingdevice to: generate an authenticated data structure of a distributeddigital ledger transaction network, the authenticated data structurecomprising a data tree storing data within a plurality of nodes;determine a first configurable storage management rule for a computernode of the distributed digital ledger transaction network that isdifferent than a second configurable storage management rule for atleast one other computer node of the distributed digital ledgertransaction network; and maintain the authenticated data structure atthe computer node based on the first configuration storage managementrule.
 12. The non-transitory computer-readable medium of claim 11,further comprising instructions that, when executed by the at least oneprocessor, cause the computing device to: determine the firstconfigurable storage management rule for the computer node bydetermining a data storage deletion rule for deleting completed subtreesof the data tree; and maintain the authenticated data structure at thecomputer node based on the first configuration storage management ruleby: determining that a subtree of the data tree is complete, the subtreecomprising a subtree root node and a plurality of child nodes; anddeleting the plurality of child nodes of the subtree based on the datastorage deletion rule.
 13. The non-transitory computer-readable mediumof claim 12, wherein the authenticated data structure further comprisesa database, and nodes of the data tree are mapped to entries in thedatabase; and further comprising instructions that, when executed by theat least one processor, cause the computing device to maintain theauthenticated data structure at the computer node based on the firstconfiguration storage management rule by deleting a plurality of entriesin the database that correspond to the plurality of child nodes of thesubtree based on the data storage deletion rule.
 14. The non-transitorycomputer-readable medium of claim 11, further comprising instructionsthat, when executed by the at least one processor, cause the computingdevice to: generate the authenticated data structure comprising the datatree by generating a state data structure comprising a state tree thatincludes nodes storing data representative of user accounts of thedistributed digital ledger transaction network; and maintain theauthenticated data structure at the computer node based on the firstconfiguration storage management rule by: determining a change in stateof the distributed digital ledger transaction network; and overwritingthe state tree of the state data structure with a subsequent state treebased on determining the change in state.
 15. The non-transitorycomputer-readable medium of claim 11, further comprising instructionsthat, when executed by the at least one processor, cause the computingdevice to: generate the authenticated data structure comprising the datatree by generating a state data structure comprising a state tree thatincludes nodes storing data representative of user accounts of thedistributed digital ledger transaction network; and maintain theauthenticated data structure at the computer node based on the firstconfiguration storage management rule by: determining a change in stateof the distributed digital ledger transaction network that correspondsto changes to one or more user accounts of the distributed digitalledger transaction network; generating a state tree component comprisingone or more nodes that reflect the changes to the one or more useraccounts based on the change in state; and associating the one or morenodes of the state tree component with one or more nodes of the statetree.
 16. The non-transitory computer-readable medium of claim 11,wherein associating the one or more nodes of the state tree componentwith the one or more nodes of the state tree comprises associating theone or more nodes of the state tree component to the one or more nodesof the state tree that correspond to user accounts that remain unchangedafter the change in state.
 17. A system comprising: at least oneprocessor; and at least one non-transitory computer-readable mediumstoring instructions thereon that, when executed by the at least oneprocessor, cause the system to: generate an authenticated data structureof a distributed digital ledger transaction network, the authenticateddata structure comprising a data tree storing data within a plurality ofnodes; determine a first configurable storage management rule for acomputer node of the distributed digital ledger transaction network thatis different than a second configurable storage management rule for atleast one other computer node of the distributed digital ledgertransaction network; and maintain the authenticated data structure atthe computer node based on the first configuration storage managementrule.
 18. The system of claim 17, further comprising instructions that,when executed by the at least one processor, cause the system to:determine the first configurable storage management rule for thecomputer node by determining a data storage deletion rule for deletingcompleted subtrees of the data tree; and maintain the authenticated datastructure at the computer node based on the first configuration storagemanagement rule by: determining that a subtree of the data tree iscomplete, the subtree comprising a subtree root node and a plurality ofchild nodes; and deleting the plurality of child nodes of the subtreebased on the data storage deletion rule.
 19. The system of claim 18,wherein the authenticated data structure further comprises a database,and nodes of the data tree are mapped to entries in the database; andfurther comprising instructions that, when executed by the at least oneprocessor, cause the system to maintain the authenticated data structureat the computer node based on the first configuration storage managementrule by deleting a plurality of entries in the database that correspondto the plurality of child nodes of the subtree based on the data storagedeletion rule.
 20. The system of claim 17, further comprisinginstructions that, when executed by the at least one processor, causethe system to: generate the authenticated data structure comprising thedata tree by generating a state data structure comprising a state treethat includes nodes storing data representative of user accounts of thedistributed digital ledger transaction network; and maintain theauthenticated data structure at the computer node based on the firstconfiguration storage management rule by: determining a change in stateof the distributed digital ledger transaction network; and overwritingthe state tree of the state data structure with a subsequent state treebased on determining the change in state.